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
Broken symlink causes wildcard matching to fail #1240
Comments
As @krader1961 has mentioned in chat, this issue and #1236 are probably related. |
I just tried an experiment with several files and directories, including a dead symlink, in a test dir. Running |
One example where this bug hits hard is a git-annex repo where not all files are locally available. Those files are then represented as dangling symlinks. Normally you could do move operations on those symlinks just fine, but not having wildcards available makes it a hassle. |
Glob expansion should use os.Lstat rather than os.Stat so that broken symlinks don't stop glob expansion. It's not the place of glob expansion to decide if a particular path is good. The symlink test cases and logic were borrowed from pkg/mods/path/path_test.go. Fixes elves#1240
Glob expansion should use os.Lstat rather than os.Stat so that broken symlinks don't stop glob expansion. It's not the place of glob expansion to decide if a particular path is good. The symlink test cases and logic were borrowed from pkg/mods/path/path_test.go. Fixes elves#1240
Glob expansion should use os.Lstat rather than os.Stat so that broken symlinks don't stop glob expansion. It's not the place of glob expansion to decide if a particular path is good. The symlink test cases and logic were borrowed from pkg/mods/path/path_test.go. Fixes elves#1240
Glob expansion should use os.Lstat rather than os.Stat so that broken symlinks don't stop glob expansion. It's not the place of glob expansion to decide if a particular path is good. The symlink test cases and logic were borrowed from pkg/mods/path/path_test.go. Fixes #1240
I have a directory with two files in it:
file1
is a symlink pointing to a file that doesn't exist anymore.file2
is a regular file.ls file*
now fails:Exception: wildcard has no match
Fixing the symlink of
file
1 resolves the issue.The text was updated successfully, but these errors were encountered: