diff --git a/src/nancy/fs.py b/src/nancy/fs.py index c6a681d..7801f36 100644 --- a/src/nancy/fs.py +++ b/src/nancy/fs.py @@ -100,7 +100,7 @@ class FSEntry: self.sha256 = self.latest_version.sha256 @classmethod - def from_path(cls, root, relpath='.', filestat=None): + def from_path(cls, root, relpath='.', filestat=None, exclude=['./nancy.db']): """ Scan a path to instantiate (recursive). """ @@ -137,7 +137,8 @@ class FSEntry: relpath=os.path.join(relpath, e.name), filestat=e.stat(), ) - for e in direntries + for e in direntries \ + if os.path.join(relpath, e.name) not in exclude ] for c in children: # now hash concatenated sorted hashes # hash on perms+sha256 to enable recursively detecting perm