From 16eab704730556b4cc03f4120e885e71caee4940 Mon Sep 17 00:00:00 2001 From: Alexander Weiss Date: Mon, 13 Jan 2025 12:42:48 +0100 Subject: [PATCH] correctly convert windows into unix path --- crates/core/src/backend/ignore.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/core/src/backend/ignore.rs b/crates/core/src/backend/ignore.rs index 1578f5e0..45693af1 100644 --- a/crates/core/src/backend/ignore.rs +++ b/crates/core/src/backend/ignore.rs @@ -460,6 +460,8 @@ fn map_entry( with_atime: bool, _ignore_devid: bool, ) -> IgnoreResult> { + use typed_path::{UnixEncoding, WindowsPath}; + let name = entry.file_name().as_encoded_bytes(); let m = entry .metadata() @@ -528,7 +530,9 @@ fn map_entry( let path = entry.into_path(); let open = Some(OpenFile(path.clone())); let path = path.strip_prefix(base_path).unwrap(); - let path = UnixPath::new(path.as_os_str().as_encoded_bytes()).to_path_buf(); + let path = WindowsPath::new(path.as_os_str().as_encoded_bytes()) + .to_path_buf() + .with_encoding::(); Ok(ReadSourceEntry { path, node, open }) }