Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

dc2020

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.
martin

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://docs.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.
dc2020

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.)
dc2020

Hmm. a file name sorting bug?

I'm not sure if it's a bug or what?

[/img]