diff --git a/attic/archiver.py b/attic/archiver.py index 5731ffb4..05076fc0 100644 --- a/attic/archiver.py +++ b/attic/archiver.py @@ -21,6 +21,7 @@ is_cachedir, bigint_to_int from attic.remote import RepositoryServer, RemoteRepository +has_lchflags = hasattr(os, 'lchflags') class Archiver: @@ -158,6 +159,9 @@ def _process(self, archive, cache, excludes, exclude_caches, skip_inodes, path, # Ignore unix sockets if stat.S_ISSOCK(st.st_mode): return + # Ignore if nodump flag set + if has_lchflags and (st.st_flags & stat.UF_NODUMP): + return self.print_verbose(remove_surrogates(path)) if stat.S_ISREG(st.st_mode): try: