Comments (5)
It took me a while but it's very obvious in hindsight.
Lines 1891 to 1893 in 5031bf1
So ".." was never sorted correctly, the ascii value of ".." is small so it happens to be the first entry most of the time.
I am not sure how to do this best. Adding the check for the second argument would be an easy fix, but I am sure there is a better way.
if (strcmp((*((const struct dlent * const *)b))->name, "..") == 0) {
return 1; /* Special-case ".." to come first. */
}
from darkhttpd.
Awesome, thank you for fixing this @g-rden!
from darkhttpd.
g-rden@914c196
This should be better in every way anyway (i hope). Does it matter that the date for ".." is now not listed? It could be added but afaik this is the normal way to display it anyway. For example https://dl-cdn.alpinelinux.org/alpine/
from darkhttpd.
Very nice find! I'm good with that.
from darkhttpd.
I don't mind about the date. :)
from darkhttpd.
Related Issues (20)
- Can not listen to IPv6 address. HOT 2
- [FR] ability to use css HOT 7
- darkhttp possibly logs incorrect size for requests.
- Skip link to parent directory when in root HOT 1
- macOS: Access to some macOS special files should be filtered out HOT 3
- PROPFIND / Read-Only WebDAV HOT 6
- Listen on IPv4 and IPv6 HOT 2
- Support FreeBSD 14+ chroot as non-root feature HOT 2
- Better argument parsing HOT 16
- Is the date header necessary? HOT 3
- Directory listings missing size in Kodi HOT 6
- With `--forward-https` set `client` ip from `X-Forwarded-For` HOT 1
- 500 for not found directory listing HOT 3
- Tests don't pass, but say they do
- --help / usage sorting is unintuitive HOT 1
- Update generated html HOT 5
- [FR] Print IEC formatted file sizes in directory listing HOT 4
- Use of stdout after fclose() HOT 2
- Out-of-chroot pidfile handling? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darkhttpd.