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 @@ -349,7 +349,7 @@ impl<'index> State<'_, 'index> {
349349 Err ( err) => return Err ( Error :: Io ( err) ) ,
350350 } ;
351351 self . symlink_metadata_calls . fetch_add ( 1 , Ordering :: Relaxed ) ;
352- let metadata = match worktree_path . symlink_metadata ( ) {
352+ let metadata = match gix_index :: fs :: Metadata :: from_path_no_follow ( worktree_path ) {
353353 Ok ( metadata) if metadata. is_dir ( ) => {
354354 // index entries are normally only for files/symlinks
355355 // if a file turned into a directory it was removed
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ where
160160 file. close ( ) ?;
161161 }
162162
163- entry. stat = Stat :: from_fs ( & std :: fs:: symlink_metadata ( dest) ?) ?;
163+ entry. stat = Stat :: from_fs ( & gix_index :: fs:: Metadata :: from_path_no_follow ( dest) ?) ?;
164164 obj. data . len ( )
165165 }
166166 gix_index:: entry:: Mode :: DIR => {
@@ -287,7 +287,7 @@ where
287287 }
288288 // NOTE: we don't call `file.sync_all()` here knowing that some filesystems don't handle this well.
289289 // revisit this once there is a bug to fix.
290- entry. stat = Stat :: from_fs ( & file . metadata ( ) ?) ?;
290+ entry. stat = Stat :: from_fs ( & gix_index :: fs :: Metadata :: from_file ( & file ) ?) ?;
291291 file. close ( ) ?;
292292 Ok ( ( ) )
293293}
You can’t perform that action at this time.
0 commit comments