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:
ogle
2012-04-27 20:38:44 +00:00
parent 39dcec0c44
commit ccb5f6b6cc

View File

@@ -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