erickguan commented on code in PR #9032:
URL: https://github.com/apache/opendal/pull/9032#discussion_r4683479035


##########
core/services/fs/src/core.rs:
##########
@@ -466,6 +471,52 @@ fn parse_conditional_rename_directory_error(
         .with_context("service_operation", "Rename")
 }
 
+/// Re-check `path` after a failed filesystem call so that Windows reports the
+/// same error kinds as Unix.
+///
+/// Windows reports a directory target as `ERROR_ACCESS_DENIED`, and a regular
+/// file in a parent component as `ERROR_PATH_NOT_FOUND` or, from
+/// `create_dir_all`, `ERROR_ALREADY_EXISTS`. Unix reports these as `EISDIR`
+/// and `ENOTDIR`. The original error is kept as the source.
+pub(crate) async fn refine_path_error(err: std::io::Error, path: &Path) -> 
std::io::Error {

Review Comment:
   I don't understand this. Windows is not responding to stat or it returns a 
bogus code so that we must retry?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to