mirror of https://github.com/borgbackup/borg.git
Merge pull request #1413 from ThomasWaldmann/store-mountpoint-dirs
save mountpoint dirs, fixes #1033
This commit is contained in:
commit
b7a563885d
|
@ -324,9 +324,10 @@ class Archiver:
|
|||
return
|
||||
if (st.st_ino, st.st_dev) in skip_inodes:
|
||||
return
|
||||
# Entering a new filesystem?
|
||||
if restrict_dev is not None and st.st_dev != restrict_dev:
|
||||
return
|
||||
# if restrict_dev is given, we do not want to recurse into a new filesystem,
|
||||
# but we WILL save the mountpoint directory (or more precise: the root
|
||||
# directory of the mounted filesystem that shadows the mountpoint dir).
|
||||
recurse = restrict_dev is None or st.st_dev == restrict_dev
|
||||
status = None
|
||||
# Ignore if nodump flag is set
|
||||
try:
|
||||
|
@ -344,6 +345,7 @@ class Archiver:
|
|||
status = 'E'
|
||||
self.print_warning('%s: %s', path, e)
|
||||
elif stat.S_ISDIR(st.st_mode):
|
||||
if recurse:
|
||||
tag_paths = dir_is_tagged(path, exclude_caches, exclude_if_present)
|
||||
if tag_paths:
|
||||
if keep_tag_files and not dry_run:
|
||||
|
@ -355,6 +357,7 @@ class Archiver:
|
|||
return
|
||||
if not dry_run:
|
||||
status = archive.process_dir(path, st)
|
||||
if recurse:
|
||||
try:
|
||||
entries = helpers.scandir_inorder(path)
|
||||
except OSError as e:
|
||||
|
|
Loading…
Reference in New Issue