aperezdc / ngx-fancyindex

Fancy indexes module for the Nginx web server
Other
857 stars 127 forks source link

Numbered Filename sorting #126

Closed kaaax0815 closed 2 years ago

kaaax0815 commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

This issue is a duplicate of #60.

aperezdc commented 2 years ago

This issue is a duplicate of #60.

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