Merge pull request #46812 from robmry/46810-vfs_faster_copy_of_hard_links

graphdriver/copy: faster copy of hard links
This commit is contained in:
Sebastiaan van Stijn 2023-11-14 13:18:30 +01:00 committed by GitHub
commit e6ae462268
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -159,6 +159,7 @@ func DirCopy(srcDir, dstDir string, copyMode Mode, copyOpaqueXattrs bool) error
return err2
}
} else if hardLinkDstPath, ok := copiedFiles[id]; ok {
isHardlink = true
if err2 := os.Link(hardLinkDstPath, dstPath); err2 != nil {
return err2
}