mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-15 01:15:05 +00:00
make sure that scantree is using key words arg
This commit is contained in:
parent
54765a5432
commit
957acb9c69
1 changed files with 1 additions and 1 deletions
|
@ -1016,7 +1016,7 @@ def clear_cache(force=False):
|
|||
dirty = None
|
||||
del_time = SGDatetime.timestamp_near(td=datetime.timedelta(hours=12))
|
||||
direntry_args = dict(follow_symlinks=False)
|
||||
for direntry in scantree(sickgear.CACHE_DIR, ['images|rss|zoneinfo'], follow_symlinks=True):
|
||||
for direntry in scantree(sickgear.CACHE_DIR, exclude_dirs=['images|rss|zoneinfo'], follow_symlinks=True):
|
||||
if direntry.is_file(**direntry_args) and (force or del_time > direntry.stat(**direntry_args).st_mtime):
|
||||
dirty = dirty or False if remove_file_perm(direntry.path) else True
|
||||
elif direntry.is_dir(**direntry_args) and direntry.name not in ['cheetah', 'sessions', 'indexers']:
|
||||
|
|
Loading…
Reference in a new issue