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
|
||||
.*.swp
|
||||
.DS_Store
|
||||
.idea*
|
||||
# a .bashrc may be added to customize the build environment
|
||||
.bashrc
|
||||
.gopath/
|
||||
|
|
|
|||
|
|
@ -1247,10 +1247,11 @@ func (archiver *Archiver) CopyFileWithTar(src, dst string) (err error) {
|
|||
}()
|
||||
|
||||
options := &TarOptions{
|
||||
UIDMaps: archiver.UntarIDMappings.UIDs(),
|
||||
GIDMaps: archiver.UntarIDMappings.GIDs(),
|
||||
ChownOpts: archiver.ChownOpts,
|
||||
InUserNS: rsystem.RunningInUserNS(),
|
||||
UIDMaps: archiver.UntarIDMappings.UIDs(),
|
||||
GIDMaps: archiver.UntarIDMappings.GIDs(),
|
||||
ChownOpts: archiver.ChownOpts,
|
||||
InUserNS: rsystem.RunningInUserNS(),
|
||||
NoOverwriteDirNonDir: true,
|
||||
}
|
||||
err = archiver.Untar(r, filepath.Dir(dst), options)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue