borg icon indicating copy to clipboard operation
borg copied to clipboard

Add previously excluded parent directories of --patterns includes to the archive

Open enkore opened this issue 8 years ago • 0 comments

if the code recurses into an excluded dir (searching for stuff that is included again in directories deeper below), it does not archive the intermediate directories, so we won't have their metadata (like uid/gid/mode/...) in the archive.

Directories must be ordered, so a/ must come before a/b, if both exist.

Discuss: A similar issue exists iirc when running borg create ... foo/bar/baz; Directories foo/ and foo/bar/ will not be included. I believe tar, whose general behaviour and design borg more or less follows, does. This part would be a 1.1.x only change.

Task: When recursing into non-recurse-excluded dirs, build a FIFO buffer of directories which have been recursed into but excluded from the archive. If a file is included in a directory, the buffer is fed into process_dir and cleared.

See also: #2322

enkore avatar Apr 23 '17 20:04 enkore