File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
gix-status/src/index_as_worktree
gix-worktree-state/src/checkout Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ impl<'index> State<'_, 'index> {
348
348
Err ( err) => return Err ( Error :: Io ( err) ) ,
349
349
} ;
350
350
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 ) {
352
352
Ok ( metadata) if metadata. is_dir ( ) => {
353
353
// index entries are normally only for files/symlinks
354
354
// if a file turned into a directory it was removed
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ where
161
161
file. close ( ) ?;
162
162
}
163
163
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) ?) ?;
165
165
obj. data . len ( )
166
166
}
167
167
gix_index:: entry:: Mode :: DIR => {
@@ -285,7 +285,7 @@ pub(crate) fn finalize_entry(
285
285
}
286
286
// NOTE: we don't call `file.sync_all()` here knowing that some filesystems don't handle this well.
287
287
// 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 ) ?) ?;
289
289
file. close ( ) ?;
290
290
Ok ( ( ) )
291
291
}
You can’t perform that action at this time.
0 commit comments