soyuka / explorer

Explore and share. Highly-configurable directory listing made with nodejs.
http://soyuka.github.io/explorer/
MIT License
179 stars 19 forks source link

Directories sort doesn't work #46

Closed Bbertatum closed 6 years ago

Bbertatum commented 6 years ago

I figured out that the directory order is innacurrate.

I tried with just numbers like YYYYMMdd => 20180120

Or even with alphabetical order the folders are shown in wrong order.

Thanks for the beautiful software otherwise :)

soyuka commented 6 years ago

I didn't get that, did you sort by name?

soyuka commented 6 years ago

order

Looks fine to me.

Bbertatum commented 6 years ago

screenshot 2018-02-14 at 12 22 18

As u can see, with the notation number-Name always fail setting a "random" (as far as I can see...) number which is placed on the top position.

I've made others tests with alphabetical letters in each folders, it's ok. It seems that the error in only related to numbers... With the notation 201802dd if you put about 20 folders with that names it will be a mess like in my screenshot.

soyuka commented 6 years ago

ouhh okay yes:

https://github.com/soyuka/explorer/blob/e5cf4702e6b32b2088b39e06b2eaa32e42e1bb41/lib/sort.js#L26

fixed on master