Skip to content

Conversation

@sarayourfriend
Copy link
Contributor

Fixes #518

I've described the root cause in this comment on the issue: #518 (comment)

To test:

  • Checkout the branch and rename some of the demo images to 10, 10.1, 10.2, etc.
  • Run the app and confirm that they now sort as expected according to the issue (10, 10.1, 10.2 rather than 10.1, 10.2, 10).
  • Download a PNG (here's a small filesized CC0 one from Wikimedia Commons you can use and name it 10.png in the demo images folder. Reverse the name sorting a couple times and confirm that 10.jpg and 10.png correctly trade places and sort alphabetically by their full filename. This test is crucial to confirm consistency in the name output, otherwise the identical extensionless names would make sorting them non-deterministic.

@sarayourfriend sarayourfriend force-pushed the fix/numerical-file-sort branch from f5f47da to c44110d Compare March 29, 2024 05:09
@bpatrik
Copy link
Owner

bpatrik commented Mar 30, 2024

Thank you for the contribution!

@bpatrik bpatrik merged commit 1e0dbc0 into bpatrik:master Mar 30, 2024
@sarayourfriend sarayourfriend deleted the fix/numerical-file-sort branch March 30, 2024 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alphabetical sort isn't correct for images like 10 and 10.1

2 participants