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:
James Shubin
2019-07-26 02:52:15 -04:00
parent ed4ee3b58e
commit 98cb570896
4 changed files with 32 additions and 12 deletions

View File

@@ -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
}