Prevent hidden root path to be ignored by --ignore-hidden-files feature#606
Merged
joseluisq merged 3 commits intostatic-web-server:masterfrom Dec 27, 2025
Merged
Conversation
Changed Files
|
Contributor
Author
|
The test in the first commit fails before the second commit is applied. |
joseluisq
requested changes
Dec 26, 2025
--ignore-hidden-files feature
Collaborator
|
Good catch. |
0864efc to
b78f759
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue where SWS returned 404 when serving from a hidden directory (i.e.,
/.root) together with the--ignore-hidden-filesfeature being enabled.Server configuration
Before
After (expected)
Related Issue
Motivation and Context
I think that only components of the path under the base path should be considered for being hidden.
The base path is explicit and there is no point in considering its components.
Current behavior was undesirable when I was trying to make automated tests that make use of this project.
In my tests, I have created temporary base directories that happen to have a hidden component.
How Has This Been Tested?
Added a test.
Screenshots (if appropriate):