Skip to content

Commit 8134767

Browse files
committed
adapt to changes in gix-index
1 parent 3c8421f commit 8134767

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gix-status/src/index_as_worktree/function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ impl<'index> State<'_, 'index> {
348348
Err(err) => return Err(Error::Io(err)),
349349
};
350350
self.symlink_metadata_calls.fetch_add(1, Ordering::Relaxed);
351-
let metadata = match worktree_path.symlink_metadata() {
351+
let metadata = match gix_index::fs::Metadata::from_path_no_follow(worktree_path) {
352352
Ok(metadata) if metadata.is_dir() => {
353353
// index entries are normally only for files/symlinks
354354
// if a file turned into a directory it was removed

gix-worktree-state/src/checkout/entry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ where
161161
file.close()?;
162162
}
163163

164-
entry.stat = Stat::from_fs(&std::fs::symlink_metadata(dest)?)?;
164+
entry.stat = Stat::from_fs(&gix_index::fs::Metadata::from_path_no_follow(dest)?)?;
165165
obj.data.len()
166166
}
167167
gix_index::entry::Mode::DIR => {
@@ -285,7 +285,7 @@ pub(crate) fn finalize_entry(
285285
}
286286
// NOTE: we don't call `file.sync_all()` here knowing that some filesystems don't handle this well.
287287
// revisit this once there is a bug to fix.
288-
entry.stat = Stat::from_fs(&file.metadata()?)?;
288+
entry.stat = Stat::from_fs(&gix_index::fs::Metadata::from_file(&file)?)?;
289289
file.close()?;
290290
Ok(())
291291
}

0 commit comments

Comments
 (0)