yunchipang commented on code in PR #457:
URL: https://github.com/apache/hudi-rs/pull/457#discussion_r2423212729


##########
crates/core/src/storage/util.rs:
##########
@@ -43,6 +43,22 @@ pub fn get_scheme_authority(url: &Url) -> String {
     format!("{}://{}", url.scheme(), url.authority())
 }
 
+/// Converts backslashes to forward slashes for cross-platform compatibility.
+pub fn normalize_path_for_storage(path: &str) -> String {
+    path.replace('\\', "/")
+}
+
+/// Joins path segments with forward slashes.
+pub fn join_storage_path(segments: &[&str]) -> String {
+    let joined = segments
+        .iter()
+        .map(|s| s.trim_matches('/').trim_matches('\\'))
+        .filter(|s| !s.is_empty())
+        .collect::<Vec<_>>()
+        .join("/");
+    normalize_path_for_storage(&joined)

Review Comment:
   @xushiyan okie. just pushed an update could you trigger CI again? thanks



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