Don't remove stuff from python cache

This commit is contained in:
Ruud
2012-12-17 17:10:53 +01:00
parent 1ac0dc3bbf
commit 63246256ee

View File

@@ -66,10 +66,12 @@ class FileManager(Plugin):
time.sleep(3)
log.debug('Cleaning up unused files')
python_cache = Env.get('cache')._path
try:
db = get_session()
for root, dirs, walk_files in os.walk(Env.get('cache_dir')):
for filename in walk_files:
if root == python_cache: continue
file_path = os.path.join(root, filename)
f = db.query(File).filter(File.path == toUnicode(file_path)).first()
if not f: