mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-27 08:00:11 +00:00
3a44a28835
with the same name exists, delete that directory first, before performing the copy. This ensures that mv(1) across devices follows the semantics of rename(2), as required by POSIX. This change could introduce the potential of data loss, even if the copy fails, violating the atomicity properties of rename(2). This is (mostly) mitigated by first renaming the destination and obliterating it only after a succesfull copy. The above logic also led to the introduction of code that will cleanup the results of a partial copy, if a cross-device copy fails. PR: bin/118367 MFC after: 1 month |
||
---|---|---|
.. | ||
Makefile | ||
mv.1 | ||
mv.c |