Actions
Bug #3109
closedmod_dirlisting javascript sort of ".." entries is broken
ASK QUESTIONS IN Forums:
No
Description
At https://git.lighttpd.net/lighttpd/lighttpd1.4/src/branch/master/src/mod_dirlisting.c#L706 the parent directory entry ("..") is handled specifically, in order to be first in the list:
if (sort_column == name_column) { if (at == '..') return -1; if (bt == '..') return 1; }
However, the "at" or "bt" variable actually has value of "../", as generated at https://git.lighttpd.net/lighttpd/lighttpd1.4/src/branch/master/src/mod_dirlisting.c#L914 , the <td>'s inner text has / at the end.
The comparison is therefore always false and has no effect.
As a result, e.g. "!Directory" or "$Directory" is sorted before "..".
Can be fixed as follows:
if (sort_column == name_column) { if (at == '../') return -1; if (bt == '../') return 1; }
Updated by gstrauss almost 3 years ago
- Status changed from New to Patch Pending
Thank you. I'll commit a fix soon.
Updated by gstrauss almost 3 years ago
- Target version changed from 1.4.xx to 1.4.61
Updated by gstrauss almost 3 years ago
- Status changed from Patch Pending to Fixed
Applied in changeset 1c41faaebc0bb4abb4b6611a812310cbc4649667.
Actions
Also available in: Atom