Co-authored-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
7dbf3fcb96
commit
c802064975
1 changed files with 5 additions and 4 deletions
|
@ -627,6 +627,11 @@ func (cr *containerReference) copyDir(dstPath string, srcPath string, useGitIgno
|
|||
return err
|
||||
}
|
||||
|
||||
// symlinks don't need to be copied
|
||||
if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
|
||||
return nil
|
||||
}
|
||||
|
||||
// open files for taring
|
||||
f, err := os.Open(file)
|
||||
if err != nil {
|
||||
|
@ -635,10 +640,6 @@ func (cr *containerReference) copyDir(dstPath string, srcPath string, useGitIgno
|
|||
|
||||
// copy file data into tar writer
|
||||
if _, err := io.Copy(tw, f); err != nil {
|
||||
if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
|
||||
// symlinks don't need to be copied, ignore this error
|
||||
err = nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue