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:
commit
e6ae462268
1 changed files with 1 additions and 0 deletions
|
@ -159,6 +159,7 @@ func DirCopy(srcDir, dstDir string, copyMode Mode, copyOpaqueXattrs bool) error
|
||||||
return err2
|
return err2
|
||||||
}
|
}
|
||||||
} else if hardLinkDstPath, ok := copiedFiles[id]; ok {
|
} else if hardLinkDstPath, ok := copiedFiles[id]; ok {
|
||||||
|
isHardlink = true
|
||||||
if err2 := os.Link(hardLinkDstPath, dstPath); err2 != nil {
|
if err2 := os.Link(hardLinkDstPath, dstPath); err2 != nil {
|
||||||
return err2
|
return err2
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue