We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ecaac2f commit 2f1db8eCopy full SHA for 2f1db8e
folders.go
@@ -38,6 +38,8 @@ func substring(s string, i int) string {
38
39
// Move a file from one location to another
40
func moveFile(s, d string) error {
41
+ // Need to make sure the full hierarchy of the destination exists
42
+ _ = os.MkdirAll(d, 0755)
43
// Firstly, try renaming it. This will fail if the files are on different partitions.
44
err := os.Rename(s, d)
45
// If that fails then we need to make a copy of the file, then delete the existing one.
0 commit comments