coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

mv: fix invalid numbered backup path

Open hamflx opened this issue 1 year ago • 4 comments

see https://github.com/uutils/coreutils/pull/6040#issuecomment-2016746488

the gnu mv:

hamflx@hamflx-workstation:~/coreutils/test$ find . -delete && mkdir C D E && touch C/c D/d E/e
hamflx@hamflx-workstation:~/coreutils/test$ mv -T --backup=numbered C E/
hamflx@hamflx-workstation:~/coreutils/test$ tree -a
.
├── D
│   └── d
├── E
│   └── c
└── E.~1~
    └── e

3 directories, 3 files

the uu_mv:

hamflx@hamflx-workstation:~/coreutils/test$ find . -delete && mkdir C D E && touch C/c D/d E/e
hamflx@hamflx-workstation:~/coreutils/test$ ../target/debug/mv -T --backup=numbered C E/
hamflx@hamflx-workstation:~/coreutils/test$ tree -a
.
├── D
│   └── d
└── E
    └── c

2 directories, 2 files

hamflx avatar Mar 24 '24 09:03 hamflx

Could you please add an highlevel integration test in https://github.com/uutils/coreutils/blob/main/tests/by-util/test_mv.rs ? thanks

sylvestre avatar Mar 31 '24 14:03 sylvestre

@sylvestre I have added integration test.

hamflx avatar Apr 03 '24 01:04 hamflx

GNU testsuite comparison:

Skip an intermittent issue tests/rm/rm1 (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

github-actions[bot] avatar Apr 03 '24 05:04 github-actions[bot]

@sylvestre @tertsdiepraam Is there anything else I need to do if I want this PR to be merged?

hamflx avatar Apr 11 '24 07:04 hamflx