From 2b02dc6d9acb00330ebbf2316724d62057ddef95 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..a69ed3bb 100644 --- a/crates/core/src/backend/ignore.rs +++ b/crates/core/src/backend/ignore.rs @@ -630,6 +630,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() @@ -727,7 +729,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 }) }