Skip to content

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

Description

@enkore

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    patternspattern matching, include, exclude, ...

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions