Hmm. a file name sorting bug?

Advertisement

Advertisement

dc2020
Joined:
Posts:
6

Re: Hmm. a file name sorting bug?

martin wrote:

You probably want to turn off "natural order numerical sorting":
https://winscp.net/eng/docs/ui_pref_panels

Thank you, if fixed it.
Although it is still a bug. For the "natural number sorting" those numbers must be separated by a whitespace.

PS. Also as a side note. You may consider using a designated service to dispatch email notifications from this forum instead of using just a built-in phpBB2's mail() function. Otherwise, no matter what I do Microsoft puts them into junk. You either have misconfigured MX- and A-records, or it may require you to adjust DKIM and SPF settings as well. Keep in mind that it's still a lose-lose situation if you don't stay on top of it. I rather prefer using services like Mailchimp, Sendgrid, Sendinblue, etc. Some have a free tier if you don't send out a lot of emails. They are designated for this kind of mailing and work really well. (I myself use Sendinblue. It's a French company.)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
38,686
Location:
Prague, Czechia

Re: Hmm. a file name sorting bug?

dc2020 wrote:

Although it is still a bug. For the "natural number sorting" those numbers must be separated by a whitespace.
WinSCP uses Windows StrCmpLogicalW function:
https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-strcmplogicalw
Which should give WinSCP a consistent behaviour (e.g. the same like in Windows File Explorer).

PS. Also as a side note. You may consider using a designated service to dispatch email notifications from this forum instead of using just a built-in phpBB2's mail() function. Otherwise, no matter what I do Microsoft puts them into junk. You either have misconfigured MX- and A-records, or it may require you to adjust DKIM and SPF settings as well. Keep in mind that it's still a lose-lose situation if you don't stay on top of it. I rather prefer using services like Mailchimp, Sendgrid, Sendinblue, etc. Some have a free tier if you don't send out a lot of emails. They are designated for this kind of mailing and work really well. (I myself use Sendinblue. It's a French company.)
I'll look into it.

Reply with quote

dc2020
Joined:
Posts:
6

Re: Hmm. a file name sorting bug?

martin wrote:

WinSCP uses Windows StrCmpLogicalW function

Wow, that's crazy. Microsoft indeed uses StrCmpLogicalW in Explorer in Windows 10. And it produces very funky results.

The issue is that on Linux, say scandir() doesn't use that weird sorting by default. So if someone uses WinSCP to connect to a Linux file system they will get very inconsistent results because of this weird Windows-centric sorting.

PS. BTW, Microsoft themselves recommend to use a totally different set of APIs for sorting, i.e CompareStringOrdinal for NTFS file names.

Reply with quote

Advertisement

You can post new topics in this forum