Repository navigation
Conversation
|
GNU testsuite comparison: |
9f4ecbd to
c99e9a8
Compare
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
Making the backup by copying reads the destination. On Windows that fails when the destination is a running image, which can be renamed but neither deleted nor overwritten in place, so cp --backup could not replace an executable that is in use. Move the destination aside instead, as GNU's backup_file_rename does. cp FILE FILE still copies, since moving the destination aside there would take the source with it. The same holds when the two names differ only in case on a case-insensitive filesystem, where they name one file: compare the source and the destination as directory entries rather than byte for byte, and leave the file alone when it is the source itself. Fixes uutils#3034
15819b3 to
58d404d
Compare
Making the backup by copying reads the destination. On Windows that fails when the destination is a running image, which can be renamed but neither deleted nor overwritten in place, so cp --backup could not replace an executable that is in use. Move the destination aside instead, as GNU's backup_file_rename does.
cp FILE FILE still copies, since moving the destination aside there would take the source with it.
Fixes #3034