You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mv -u silently skips an entire directory when the destination directory has an equal or newer timestamp #17003
When the destination is an existing empty directory with an equal or newer modification time, mv -u exits 0 but leaves the entire source directory in place. A script that pre-creates a staging directory can continue to packaging with all the files from the move missing.
Reproduction
Run once per implementation with the mv under test on PATH.
Neither implementation prints a diagnostic. With uutils, stage/release remains empty. The GNU mv manual limits the timestamp skip to non-directory sources.
Source
In mv.rs, lines 827–838, (!from_is_dir || to_metadata.is_dir()) is true when both entries are directories. If the source mtime is less than or equal to the destination mtime, the function returns Ok(()) before attempting the rename.
Tested on Debian 13, x86-64 Linux 6.18.57, with uutils 0.13.0 (07b76df), upstream main (2a072db), and GNU Coreutils 9.7 and 9.12. I found no matching issue or PR. The related PR #15912 addressed dangling destination symlinks.
Activity