mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Fix for images in cache folder being deleted by cleaner routine.
This commit is contained in:
parent
d916958abc
commit
480199085e
1 changed files with 3 additions and 6 deletions
|
@ -1336,12 +1336,9 @@ def clearCache(force=False):
|
|||
max_age = datetime.timedelta(hours=12)
|
||||
|
||||
# Get all our cache files
|
||||
for cache_root, cache_dirs, cache_files in os.walk(sickbeard.CACHE_DIR):
|
||||
path = os.path.basename(cache_root)
|
||||
|
||||
# skip these cache folders
|
||||
if path in ['rss', 'images']:
|
||||
continue
|
||||
exclude = ['rss', 'images']
|
||||
for cache_root, cache_dirs, cache_files in os.walk(sickbeard.CACHE_DIR, topdown=True):
|
||||
cache_dirs[:] = [d for d in cache_dirs if d not in exclude]
|
||||
|
||||
for file in cache_files:
|
||||
cache_file = ek.ek(os.path.join, cache_root, file)
|
||||
|
|
Loading…
Reference in a new issue