if they are the same and dest is a directory, should error like cp behavior Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
This commit is contained in:
parent
69ef37be2a
commit
74e01d6ccd
|
|
@ -9,6 +9,7 @@
|
||||||
*.test
|
*.test
|
||||||
.*.swp
|
.*.swp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.idea*
|
||||||
# a .bashrc may be added to customize the build environment
|
# a .bashrc may be added to customize the build environment
|
||||||
.bashrc
|
.bashrc
|
||||||
.gopath/
|
.gopath/
|
||||||
|
|
|
||||||
|
|
@ -1251,6 +1251,7 @@ func (archiver *Archiver) CopyFileWithTar(src, dst string) (err error) {
|
||||||
GIDMaps: archiver.UntarIDMappings.GIDs(),
|
GIDMaps: archiver.UntarIDMappings.GIDs(),
|
||||||
ChownOpts: archiver.ChownOpts,
|
ChownOpts: archiver.ChownOpts,
|
||||||
InUserNS: rsystem.RunningInUserNS(),
|
InUserNS: rsystem.RunningInUserNS(),
|
||||||
|
NoOverwriteDirNonDir: true,
|
||||||
}
|
}
|
||||||
err = archiver.Untar(r, filepath.Dir(dst), options)
|
err = archiver.Untar(r, filepath.Dir(dst), options)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue