-
Notifications
You must be signed in to change notification settings - Fork 743
Closed
Closed
Copy link
Labels
bash compatCompatibility issues with bash or POSIX behaviorCompatibility issues with bash or POSIX behaviorfixBug/defect, or a fix for such a problemBug/defect, or a fix for such a problemhelp wantedlow priority
Milestone
Description
If you have a copy command like:
$ cp file1.txt out/file1.txt destination/You should get an error that says something like:
cp: will not overwrite just-created ‘destination/file1.txt’ with ‘out/file1.txt’
We're currently silently overwriting files that we created in that same copy command, but should instead provide a warning and refuse to copy the second file.
The behavior should stay the same with -f and -r, but cp does not give the warning with directories or their contents.
$ cp dir1 out/dir1 destination/ # never has this error
$ ls destination/dir1/ # shows the merged contents of both ./dir1/ and out/dir1/The warning is never present with the -n flag.
This warning should also be presented for the mv command.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bash compatCompatibility issues with bash or POSIX behaviorCompatibility issues with bash or POSIX behaviorfixBug/defect, or a fix for such a problemBug/defect, or a fix for such a problemhelp wantedlow priority