Merge pull request #4316 from justinsb/copytree_fix_dest_not_exists

VFS: Fix bug in CopyTree when dest does not exist
This commit is contained in:
k8s-ci-robot 2018-01-27 12:45:30 -08:00 committed by GitHub
commit b48ed40551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -224,7 +224,9 @@ func CopyTree(src Path, dest Path, aclOracle ACLOracle) error {
destFiles, err := dest.ReadTree()
if err != nil {
return fmt.Errorf("error reading source directory %q: %v", src, err)
if !os.IsNotExist(err) {
return fmt.Errorf("error reading source directory %q: %v", src, err)
}
}
destFileMap := make(map[string]Path)