Skip to content

Commit 5fbbaaa

Browse files
committed
adapt to changes in gix-glob
1 parent 31ade4a commit 5fbbaaa

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

gix-fs/src/symlink.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub fn create(original: &Path, link: &Path) -> io::Result<()> {
5959
pub fn is_collision_error(err: &std::io::Error) -> bool {
6060
// TODO: use ::IsDirectory as well when stabilized instead of raw_os_error(), and ::FileSystemLoop respectively
6161
err.kind() == AlreadyExists
62-
|| err.raw_os_error() == Some(21)
62+
|| err.raw_os_error() == Some(if cfg!(windows) { 5 } else { 21 })
6363
|| err.raw_os_error() == Some(62) // no-follow on symlnk on mac-os
6464
|| err.raw_os_error() == Some(40) // no-follow on symlnk on ubuntu
6565
}

gix-worktree/src/stack/delegate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use crate::stack::mode_is_dir;
21
use crate::{stack::State, PathIdMapping};
32

43
/// Various aggregate numbers related to the stack delegate itself.
@@ -167,7 +166,7 @@ fn create_leading_directory(
167166
mkdir_calls: &mut usize,
168167
unlink_on_collision: bool,
169168
) -> std::io::Result<()> {
170-
if is_last_component && !mode_is_dir(mode).unwrap_or(false) {
169+
if is_last_component && !crate::stack::mode_is_dir(mode).unwrap_or(false) {
171170
return Ok(());
172171
}
173172
*mkdir_calls += 1;

0 commit comments

Comments
 (0)