Open metsuke0 opened 4 years ago
Hmm, I can't reproduce this on Linux. It will probably be a while before I will debug this on Windows. Others are welcome to investigate and look for a fix sooner.
Yep same here. If I can find some time I'll poke around.
I ran into the same issues with Go/JS. Windows is just really stubborn with this kind of stuff.
Once I get a good entry
I get some of those Os
errors to when calling fs::metadata
.
Even if the permission is correct I do get errors like:
Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." }
and
Os { code: 1920, kind: Other, message: "The file cannot be accessed by the system." }
So I do believe it's mostly a Windows issue.
Here is my code in a repo but it is pretty much the same as above: https://github.com/selfup/win42/blob/master/src/main.rs#L37
However on the unwrap
sometimes you get a Some
with the path!
Error {
depth: 21,
inner: Io {
path: Some("C:/Users\\selfup\\AppData\\Roaming\\REDACTED"),
err: Os {
code: 3,
kind: NotFound,
message: "The system cannot find the path specified."
}
}
}
When iterating over the WalkDir dictionary in Windows 10, rust stable 1.36, if the user does not have permission to read a directory, an error is given, but not the actual path. When hitting an error with files, the path in the error is displayed but not with directories for some reason: