Skip to content

Commit

Permalink
more windows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome committed Jan 11, 2025
1 parent e13b75a commit 15e23f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
23 changes: 10 additions & 13 deletions crates/core/src/backend/ignore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,11 @@ fn map_entry(
Node::new_node(name, NodeType::Dir, meta)
} else if m.is_symlink() {
let path = entry.path();
let target = read_link(path)
.map_err(|err| IgnoreErrorKind::ErrorLink {
path: path.to_path_buf(),
source: err,
})?
.as_encoded_bytes();
let target = read_link(path).map_err(|err| IgnoreErrorKind::ErrorLink {
path: path.to_path_buf(),
source: err,
})?;
let target = target.as_os_str().as_encoded_bytes();
let node_type = NodeType::from_link(&target);

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

View workflow job for this annotation

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

mismatched types
Node::new_node(name, node_type, meta)
} else {
Expand Down Expand Up @@ -688,13 +687,11 @@ fn map_entry(
Node::new_node(name, NodeType::Dir, meta)
} else if m.is_symlink() {
let path = entry.path();
let target = read_link(path)
.map_err(|err| IgnoreErrorKind::ErrorLink {
path: path.to_path_buf(),
source: err,
})?
.into_os_string();
let target = target.as_encoded_bytes();
let target = read_link(path).map_err(|err| IgnoreErrorKind::ErrorLink {
path: path.to_path_buf(),
source: err,
})?;
let target = target.as_os_str().as_encoded_bytes();
let node_type = NodeType::from_link(&UnixPath::new(target).to_typed_path());
Node::new_node(name, node_type, meta)
} else if filetype.is_block_device() {
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/backend/node.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::{borrow::Cow, cmp::Ordering, fmt::Debug};

use std::fmt::Write;
#[cfg(not(windows))]
use std::num::ParseIntError;

use chrono::{DateTime, Local};
Expand Down

0 comments on commit 15e23f1

Please sign in to comment.