1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-25 07:23:28 +00:00

Merge pull request #4025 from ThomasWaldmann/fix-cachedir-1.1

don't archive tagged dir when recursing an excluded dir, fixes #3991
This commit is contained in:
TW 2018-08-09 15:33:37 +02:00 committed by GitHub
commit 855ae3f7ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -607,13 +607,16 @@ def _process(self, archive, cache, matcher, exclude_caches, exclude_if_present,
if recurse: if recurse:
tag_paths = dir_is_tagged(path, exclude_caches, exclude_if_present) tag_paths = dir_is_tagged(path, exclude_caches, exclude_if_present)
if tag_paths: if tag_paths:
if keep_exclude_tags and not dry_run: # if we are already recursing in an excluded dir, we do not need to do anything else than
archive.process_dir(path, st) # returning (we do not need to archive or recurse into tagged directories), see #3991:
for tag_path in tag_paths: if not recurse_excluded_dir:
self._process(archive, cache, matcher, exclude_caches, exclude_if_present, if keep_exclude_tags and not dry_run:
keep_exclude_tags, skip_inodes, tag_path, restrict_dev, archive.process_dir(path, st)
read_special=read_special, dry_run=dry_run) for tag_path in tag_paths:
self.print_file_status('x', path) self._process(archive, cache, matcher, exclude_caches, exclude_if_present,
keep_exclude_tags, skip_inodes, tag_path, restrict_dev,
read_special=read_special, dry_run=dry_run)
self.print_file_status('x', path)
return return
if not dry_run: if not dry_run:
if not recurse_excluded_dir: if not recurse_excluded_dir: