util: Add new mkdirall variants for the copy functions
This adds versions that recursively `mkdir` and all don't error as easily. This works around some bugs we were having with file copying.
This commit is contained in:
@@ -53,7 +53,7 @@ func TestCopyFs1(t *testing.T) {
|
||||
t.Errorf("could not MkdirAll %+v", err)
|
||||
return
|
||||
}
|
||||
err = CopyFs(src, dst, tt.srcCopyRoot, tt.dstCopyRoot, tt.force)
|
||||
err = CopyFs(src, dst, tt.srcCopyRoot, tt.dstCopyRoot, tt.force, false)
|
||||
if err != nil {
|
||||
t.Errorf("error copying source %s to dest %s", tt.srcCopyRoot, tt.dstCopyRoot)
|
||||
return
|
||||
@@ -100,7 +100,7 @@ func TestCopyFs2(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
if err = CopyFs(src, dst, "", "", false); err != nil {
|
||||
if err = CopyFs(src, dst, "", "", false, false); err != nil {
|
||||
t.Errorf("could not CopyFs: %+v", err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user