Skip to content

Commit

Permalink
adapt to changes in gix-glob
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed May 28, 2024
1 parent 31ade4a commit 5fbbaaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gix-fs/src/symlink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub fn create(original: &Path, link: &Path) -> io::Result<()> {
pub fn is_collision_error(err: &std::io::Error) -> bool {
// TODO: use ::IsDirectory as well when stabilized instead of raw_os_error(), and ::FileSystemLoop respectively
err.kind() == AlreadyExists
|| err.raw_os_error() == Some(21)
|| err.raw_os_error() == Some(if cfg!(windows) { 5 } else { 21 })
|| err.raw_os_error() == Some(62) // no-follow on symlnk on mac-os
|| err.raw_os_error() == Some(40) // no-follow on symlnk on ubuntu
}
Expand Down
3 changes: 1 addition & 2 deletions gix-worktree/src/stack/delegate.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::stack::mode_is_dir;
use crate::{stack::State, PathIdMapping};

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

0 comments on commit 5fbbaaa

Please sign in to comment.