You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Error on entry 'Err(Error { depth: 2, inner: Io { path: None, err: Os { code: 5, kind: PermissionDenied, message: "Access is denied." } } })': Error { depth: 2, inner: Io { path: None, err: Os { code: 5, kind: PermissionDenied, message: "Access is denied." } } }
for entry in WalkDir::new(some_path){
prepath = match &entry {
Ok(path) => {
path
}
Err(err) => {
println!("Error on entry '{:?}': {:?}", entry, err);
continue
}
};
The text was updated successfully, but these errors were encountered:
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.
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:
The text was updated successfully, but these errors were encountered: