From a5940b4eb114c06be4bb3e407c707c562c143ddf Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 25 Apr 2026 13:59:37 +0530 Subject: [PATCH] ... --- tools/utils/file_at_fd.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/utils/file_at_fd.go b/tools/utils/file_at_fd.go index 2004b7196..ae23a7de5 100644 --- a/tools/utils/file_at_fd.go +++ b/tools/utils/file_at_fd.go @@ -435,6 +435,11 @@ func copy_file_and_close(ctx context.Context, src *os.File, dest *os.File) (err // Existing regular files are overwritten, without changing their permissions. // Existing directories also do not have their permissions updated. func CopyFolderContents(ctx context.Context, src_folder *os.File, dest_folder *os.File, opts CopyFolderOptions) (final_error error) { + // Ensure we get all dir contents + _, err := src_folder.Seek(0, io.SeekStart) + if err != nil { + return err + } // When following symlinks, store previously seen source items with the // abspaths they have been copied to in dest. Items are identified with // device + inode number which should be globally unique. This ensures 1)