Add previously excluded parent directories of --patterns includes to the archive
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 875
- Avg merge
- 11h 15m
- Merged PRs (30d)
- 192
Description
> 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
Contributor guide
Assessment
This issue has not been assessed yet.