mirror of
https://github.com/munki/munki.git
synced 2026-01-26 00:49:21 -06:00
Add /private/* to the isExcludedFilesystem skipdirs.
Also, change skipdirs from a list to a set for far faster "in" operator performance.
This commit is contained in:
@@ -1698,9 +1698,9 @@ def isExcludedFilesystem(path, _retry=False):
|
||||
return None
|
||||
|
||||
# always ignore these directories
|
||||
skipdirs = ['Volumes', 'tmp', '.vol', '.Trashes', '.MobileBackups',
|
||||
'.Spotlight-V100', '.fseventsd', 'Network', 'net',
|
||||
'home', 'cores', 'dev']
|
||||
skipdirs = set('Volumes', 'tmp', '.vol', '.Trashes', '.MobileBackups',
|
||||
'.Spotlight-V100', '.fseventsd', 'Network', 'net',
|
||||
'home', 'cores', 'dev', 'private')
|
||||
path_components = path.split('/')
|
||||
if len(path_components) > 1 and path_components[1] in skipdirs:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user