hfutatzhanghb commented on code in PR #7815:
URL: https://github.com/apache/opendal/pull/7815#discussion_r3487777159


##########
core/services/hdfs/src/core.rs:
##########
@@ -22,6 +22,19 @@ use std::sync::Arc;
 use opendal_core::raw::*;
 use opendal_core::*;
 
+fn map_hdfs_rename_error(err: io::Error, if_not_exists: bool, to_path: &str) 
-> Error {
+    if if_not_exists && err.kind() == io::ErrorKind::AlreadyExists {
+        return Error::new(
+            ErrorKind::ConditionNotMatch,
+            "target path already exists while if_not_exists is set",
+        )
+        .with_context("input", to_path)

Review Comment:
   have renamed it to  'to'.



-- 
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