From f17914f5f92b37cf0e8c52929bf443bba9b9ad52 Mon Sep 17 00:00:00 2001 From: awol2005ex Date: Mon, 20 Jan 2025 14:09:04 +0800 Subject: [PATCH] fix the error that when execute client.list_status_iter(&source_file_path, true); in windows paltform,throw file not found error because of the path separator is not '/' but '\' --- rust/src/client.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/src/client.rs b/rust/src/client.rs index 341f1eb..f967049 100644 --- a/rust/src/client.rs +++ b/rust/src/client.rs @@ -588,11 +588,12 @@ pub(crate) struct DirListingIterator { impl DirListingIterator { fn new(path: String, mount_table: &Arc, files_only: bool) -> Self { - let (link, resolved_path) = mount_table.resolve(&path); + + let (link, resolved_path) = mount_table.resolve(&path.replace("\\","/")); DirListingIterator { path, - resolved_path, + resolved_path: resolved_path.replace("\\","/"), link: link.clone(), files_only, partial_listing: VecDeque::new(),