-
Notifications
You must be signed in to change notification settings - Fork 90
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
Hiding hidden (. dot) files as an option #72
Comments
I think this is clever if there's other interest in it. I don't know if if I have a use for it. Could possibly make it a settable prefix, although dotfiles would be the most common case. |
Another motivation would be some configuration files/metadata, that maybe someones would like to hide from sharing. I can imagine someone is sharing its entire home folder (😅), but doesn't necessarily want to also share its SSH configuration and other stuff 🙂 |
At this point a blacklist would be preferable instead of just not serving dotfiles. Which is probably out of the scope of this project. This patch works fine for me
|
I never meant to always not serve them, but rather adding it as a flag, like you just did - so thanks and hope it'll go mainline 👍 |
I'm a little bit worried about hiding dotfiles from directory listings but then still serving them if someone enters it in the address bar, because of the potential security consequences. @g-rden I like your patch. Would you like to send it as a PR? Couple of nits: want_hidden -> want_hide_dotfiles "Don't serve dotfiles." -> this needs to be really clear -> "Hide dotfiles from directory listings, but still serve them if requested." --hide_dotfiles -> --hide-dotfiles (hyphens for flags) |
I missed that. That seems like a bad idea and not serving them would not conflict with the interests of this issue. I made a quick patch. I don't know if it's any good.
|
Hello, it would be nice to be able to not displaying hidden files on directory listings.
My motivation is mostly macOS, which tends to leave a ton of "noise" in shared folders it accesses on my server. Sometimes I want to share those files with darkhttpd and then I'm quite annoyed with all those
.DS_Store
and other files.I changed that myself in my build, but it probably should be done cleaner, with an option probably set to false by default.
Change is two lines of code in
make_sorted_dirlist
:I can probably add an option parsing and make a proper pull request if there'll be such need.
The text was updated successfully, but these errors were encountered: