Skip to content

Commit 15e23f1

Browse files
committed
more windows fixes
1 parent e13b75a commit 15e23f1

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

crates/core/src/backend/ignore.rs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,11 @@ fn map_entry(
499499
Node::new_node(name, NodeType::Dir, meta)
500500
} else if m.is_symlink() {
501501
let path = entry.path();
502-
let target = read_link(path)
503-
.map_err(|err| IgnoreErrorKind::ErrorLink {
504-
path: path.to_path_buf(),
505-
source: err,
506-
})?
507-
.as_encoded_bytes();
502+
let target = read_link(path).map_err(|err| IgnoreErrorKind::ErrorLink {
503+
path: path.to_path_buf(),
504+
source: err,
505+
})?;
506+
let target = target.as_os_str().as_encoded_bytes();
508507
let node_type = NodeType::from_link(&target);
509508
Node::new_node(name, node_type, meta)
510509
} else {
@@ -688,13 +687,11 @@ fn map_entry(
688687
Node::new_node(name, NodeType::Dir, meta)
689688
} else if m.is_symlink() {
690689
let path = entry.path();
691-
let target = read_link(path)
692-
.map_err(|err| IgnoreErrorKind::ErrorLink {
693-
path: path.to_path_buf(),
694-
source: err,
695-
})?
696-
.into_os_string();
697-
let target = target.as_encoded_bytes();
690+
let target = read_link(path).map_err(|err| IgnoreErrorKind::ErrorLink {
691+
path: path.to_path_buf(),
692+
source: err,
693+
})?;
694+
let target = target.as_os_str().as_encoded_bytes();
698695
let node_type = NodeType::from_link(&UnixPath::new(target).to_typed_path());
699696
Node::new_node(name, node_type, meta)
700697
} else if filetype.is_block_device() {

crates/core/src/backend/node.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::{borrow::Cow, cmp::Ordering, fmt::Debug};
22

33
use std::fmt::Write;
4-
#[cfg(not(windows))]
54
use std::num::ParseIntError;
65

76
use chrono::{DateTime, Local};

0 commit comments

Comments
 (0)