Skip to content

bug(install): same file for dst and src cause the file from being moved to ~<FILE>, and the original file gone when using the --backup='nil' flag #12696

@HackingRepo

Description

@HackingRepo

Hi, uutils mainteners

it is weird when using, --backup='nil' and file X for dst and src, it renames X to ~X and original X gone, that is the test for gnu and uutils install both

relunsec@relunsec:~/software/coreutils/target/debug$ echo "b" > a
relunsec@relunsec:~/software/coreutils/target/debug$ gnuinstall --backup='nil' a a
gnuinstall: 'a' and 'a' are the same file
relunsec@relunsec:~/software/coreutils/target/debug$ cat a
b
relunsec@relunsec:~/software/coreutils/target/debug$ ./install --backup='nil' a a
install: No such file or directory
relunsec@relunsec:~/software/coreutils/target/debug$ cat a
cat: a: No such file or directory
relunsec@relunsec:~/software/coreutils/target/debug$ 

as you can see the gnu correctly say same files but uutils install processeds even X the same for dst and src

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions