mirror of
https://github.com/borgbackup/borg.git
synced 2026-10-12 02:11:36 +00:00
Extracting into a non-empty directory replaces existing files that are in the way and leaves all other existing files as they are, so the result is a mix of existing and extracted files. Accidentally running "borg extract" in a directory that is in use (like a home directory) thus replaced current files by their archived state and blended the archive into the directory. Now borg aborts with Archive.ExtractionDirNotEmpty (rc 33) before writing anything if the current directory is not empty, unless --continue is given. This also applies when only a part of the archive is extracted. --dry-run and --stdout do not write into the directory, so they are not checked. No new option: --continue already is the way to extract into a directory that has contents. Its help and the extract docs now describe what it does (skip files that are fully extracted already, replace other existing files) and that a damaged file with unchanged size and mtime must be removed before it can be extracted again. Tests that extracted repeatedly into the same directory now use --continue or a fresh directory. Co-Authored-By: Claude Fable 5.1 <[email protected]>