Don't modify the list in the cache, make a copy
This commit is contained in:
parent
5c9ed254ff
commit
9e1f82d977
1 changed files with 4 additions and 1 deletions
|
|
@ -176,6 +176,9 @@ def _getFileList(origin, path=None, filter=None, recursive=False):
|
|||
_file_cache["{}:{}:{}:{}".format(origin, path, recursive, filter)] = (files, lastmodified)
|
||||
|
||||
def analyse_recursively(files, path=None):
|
||||
# make a shallow copy in order to not accidentally modify the cached data
|
||||
files = list(files)
|
||||
|
||||
if path is None:
|
||||
path = ""
|
||||
|
||||
|
|
@ -233,7 +236,7 @@ def _getFileList(origin, path=None, filter=None, recursive=False):
|
|||
|
||||
return files
|
||||
|
||||
analyse_recursively(files)
|
||||
files = analyse_recursively(files)
|
||||
|
||||
return files
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue