Many behavioral changes of proot-distro copy and sync.
Fixes that prevent data loss:
sync --deletecould delete files it had just written, delete the source directory itself, or wipe a whole destination tree when the source could not be read. It is now much more careful about what counts as a leftover, and refuses to delete anything at all if it cannot reliably list the source.copy --moveacross devices (for example moving a container folder to /sdcard) no longer deletes source files it was unable to copy.- Copying or syncing a folder into a symlink that pointed back into the source no longer loops until it runs out of memory, leaving hundreds of stray directories behind.
Security:
- A container can no longer trick
copyorsyncinto reading or writing files outside its own filesystem by planting symlinks or hard links. Every write now creates a new file rather than writing through a name that was already there. - File names coming from inside a container are escaped before being printed, so a crafted name cannot mess with your terminal.
Transfers now finish instead of stopping halfway:
- A file that cannot be read or written is reported, skipped, and the transfer continues; the command exits with status 1 at the end. Previously a single locked file, a very long file name, or a symlink on a filesystem that does not support them (such as /sdcard) could abandon the rest of the transfer, sometimes without saying so.
- Very deep folder trees no longer crash with a Python traceback.
Files come out closer to the originals:
- Folder permissions and timestamps are now preserved, not stamped with the time of the transfer.
- A file whose permissions changed is updated without recopying it.
- Sparse files (such as /var/log/lastlog, which can look enormous) are copied as sparse files instead of expanding to their full size and filling up the device.
--checksumnow updates timestamps when the contents already match.
Behaviour matching cp / mv / rsync:
copy -ronto an existing folder puts the source inside it and merges into it, so running the same copy twice updates instead of failing.- Symlinks given as the source or destination are followed, on both the host and container side; symlinks inside the tree are still copied as symlinks.
--movemoves the link itself, as mv does. syncreports skipped device files, sockets and FIFOs instead of passing over them silently.sync --deletenow requires a folder as the source (it silently did nothing with a single file).
Other:
- Host paths containing a colon are usable again, written as ./a:b.
- Progress bars no longer show counts like "(5/1)" or overflow.
- Help text explains what --checksum actually checks and that hard links become independent copies.