-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
<filesystem>
: exists()
fails with "Access denied" for certain type of symlinks
#5095
Comments
I can reproduce the behavior by creating a non-directory symlink to a directory:
I'm not sure why |
<filesystem>
: exists()
fails with "Access denied" for certain type of symlinks
We talked about this at the weekly maintainer meeting and @CaseyCarter's repro needs more investigation to determine whether it's a bug or by design according to Windows filesystem rules. |
Three years ago, I encountered the same issue and concluded that it's due to the design of |
@YexuanXiao Thanks for the archaeology! I agree completely with @strega-nil-ms' assertion that we want to report an error for this case. Is there a more appropriate error than |
[fs.dir.entry.obs] points out that I also noticed a discrepancy: when a symlink pointing to a file actually points to a directory, |
Describe the bug
We use
std::filesystem::exists
to check existence of paths on the system. Since few days we started to see an error where this function would fail withAccess Denied
. Unfortunately I could not get a fully reproducible example but I am gonna describe what I noticed.This is the logged error
This is the list of paths inside
some_path
The function fails on all the paths having the
a
andl
bit on while it succeeds on the others.Permissions should not be the problem: I tried with different users and with all of them I can read the files using powershell (with a simple
ls
).Other things worth mentioning: these are symlinks that point to other symlinks
again, I tried to repro by re-building a folder structure of this type but I couldn't reproduce the error
Any advice?
The text was updated successfully, but these errors were encountered: