-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
When attempting to copy files/dirs from the temporary directory to the destination and there already exists the same source directory in dst, the os.Rename call returns an ErrExist error ("file exists").
Note
This only occurs with directories; files are overwritten.
This is easily reproduced by running the same gitdl command twice containing at least one directory source:
$ ./gitdl cedricium/personal-site README.md posts public/blog-assets/coffee ~/Downloads/_gitdl/ # successful
$ ./gitdl cedricium/personal-site README.md posts public/blog-assets/coffee ~/Downloads/_gitdl/ # fails for dirs, README.md is overwritten
gitdl: rename /var/folders/r_/2r2qfg75683__01qq64k5vh80000gn/T/gitdl-4012728841/posts /Users/cedricamaya/Downloads/_gitdl/posts: file exists
gitdl: rename /var/folders/r_/2r2qfg75683__01qq64k5vh80000gn/T/gitdl-4012728841/public/blog-assets/coffee /Users/cedricamaya/Downloads/_gitdl/coffee: file existsMetadata
Metadata
Assignees
Labels
No labels