-
Notifications
You must be signed in to change notification settings - Fork 222
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
Symlinks are not properly handled #119
Comments
a2800276
changed the title
Symlinks are properly handled
Symlinks are not properly handled
Oct 18, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
generateSource
function in main packagestatik.go
is not handling symlinks correctly in all situations:This is because WalkFunc injects a FileInfo that was generated by
os.Lstat
which provides the link's FileInfo instead ofos.Stat
describing the underlying file. Regular directory's response toIsDir
and are ignored, symlinked directories pass the directory check.The immediate problem can be corrected with this patch:
But:
filePath.Walk
does not follow symlinks ...The text was updated successfully, but these errors were encountered: