This commit is contained in:
Kovid Goyal 2026-04-25 13:59:37 +05:30
parent ecc241d891
commit a5940b4eb1
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -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)