fix: negate followLinks flag for checkSymlinkState#843
Merged
Conversation
Member
|
Good catch! Looking through the callers of Can we also add tests for this (at least on Unix-like platforms, where we have symlinks)? |
Contributor
Author
|
I gave it a try! Not sure if this was the right place for them though... let me know if you need me to move something. I created one test case for each |
Member
|
Thanks a lot for the fixes and tests! |
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.
I'm using sshd-sftp as a custom SFTP server for its great virtual file system capabilities (it allows me to easily create a virtual space for each user). Each user directory contains symlinks (essentially "shares") to folders outside of the virtual file system.
After upgrading to 2.16.0 I noticed that file deletion did not work anymore. It kept giving me a
NoSuchFileException"Removal candidate not found".In
doRemoveFileit seems likefollowLinksis missing a!before being passed tocheckSymlinkState. This was done correctly in other methods such asdoRemoveDirectory.