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> {
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
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments