use that nice function i wrote

This commit is contained in:
whyrusleeping
2019-12-08 22:30:17 +01:00
parent ba55aa117f
commit c3dd9c55e2
+2 -2
View File
@@ -734,8 +734,8 @@ func copyAllFiles(from, to string) error {
return xerrors.Errorf("failed to list items in dir: %w", err)
}
for _, n := range names {
if err := os.Rename(filepath.Join(from, n), filepath.Join(to, n)); err != nil {
return xerrors.Errorf("moving file failed: %w", err)
if err := copyFile(filepath.Join(from, n), filepath.Join(to, n)); err != nil {
return xerrors.Errorf("copying file failed: %w", err)
}
}