Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numbered Filename sorting #126

Closed
kaaax0815 opened this issue Feb 23, 2021 · 3 comments
Closed

Numbered Filename sorting #126

kaaax0815 opened this issue Feb 23, 2021 · 3 comments

Comments

@kaaax0815
Copy link

I have many png files generated with a for loop ({1..3000..100}) (1,101,201,301,401,501)
But when I press on "Filename" it doesnt sort right.
It sorts (1,1001,101,1101,1201,1301...2001,201,2101)

@ryandesign
Copy link
Contributor

Right, it sorts names using ngx_strcmp which sorts in lexographic order. It's not surprising; many things sort that way, including the built-in nginx module autoindex.

You're asking for it to sort in natural order instead. I would prefer that too, but maybe some people won't, so maybe it should be a configurable option. I don't think nginx already has a natural order sort function that ngx-fancyindex could use. Perhaps it would be beneficial to suggest the addition of such a function to the developers of nginx and to make it possible for the built-in autoindex module to use it via a configuration option. Then ngx-fancyindex will be able to use that new function too.

@ryandesign
Copy link
Contributor

This issue is a duplicate of #60.

@aperezdc
Copy link
Owner

This issue is a duplicate of #60.

Yes. Let's close this in favor of the other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants