Skip to content

Commit

Permalink
correctly convert windows into unix path
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome committed Jan 13, 2025
1 parent 85cd116 commit dffed09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/core/src/backend/ignore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,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())

Check failure on line 531 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking x86_64-pc-windows-msvc on stable

failed to resolve: use of undeclared type `WindowsPath`

Check failure on line 531 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking x86_64-pc-windows-gnu on stable

failed to resolve: use of undeclared type `WindowsPath`
.to_path_buf()
.with_encoding::<UnixEncoding>();

Check failure on line 533 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking x86_64-pc-windows-msvc on stable

cannot find type `UnixEncoding` in this scope

Check failure on line 533 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking x86_64-pc-windows-gnu on stable

cannot find type `UnixEncoding` in this scope
Ok(ReadSourceEntry { path, node, open })
}

Expand Down Expand Up @@ -630,6 +632,8 @@ fn map_entry(
with_atime: bool,
ignore_devid: bool,
) -> IgnoreResult<ReadSourceEntry<OpenFile>> {
use typed_path::{UnixEncoding, WindowsPath};

Check warning on line 635 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking aarch64-apple-darwin on stable

unused imports: `UnixEncoding` and `WindowsPath`

Check warning on line 635 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking x86_64-unknown-linux-gnu on stable

unused imports: `UnixEncoding` and `WindowsPath`

Check warning on line 635 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking x86_64-unknown-linux-musl on stable

unused imports: `UnixEncoding` and `WindowsPath`

Check warning on line 635 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking aarch64-unknown-linux-gnu on stable

unused imports: `UnixEncoding` and `WindowsPath`

Check warning on line 635 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking aarch64-unknown-linux-musl on stable

unused imports: `UnixEncoding` and `WindowsPath`

Check warning on line 635 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking i686-unknown-linux-gnu on stable

unused imports: `UnixEncoding` and `WindowsPath`

Check warning on line 635 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking x86_64-unknown-netbsd on stable

unused imports: `UnixEncoding` and `WindowsPath`

Check warning on line 635 in crates/core/src/backend/ignore.rs

View workflow job for this annotation

GitHub Actions / Cross checking armv7-unknown-linux-gnueabihf on stable

unused imports: `UnixEncoding` and `WindowsPath`

let name = entry.file_name().as_encoded_bytes();
let m = entry
.metadata()
Expand Down

0 comments on commit dffed09

Please sign in to comment.