From 63246256ee8675dc9aa9c114c465bdb9520765ba Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 17 Dec 2012 17:10:53 +0100 Subject: [PATCH] Don't remove stuff from python cache --- couchpotato/core/plugins/file/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/couchpotato/core/plugins/file/main.py b/couchpotato/core/plugins/file/main.py index 5c40df02..a9eab33d 100644 --- a/couchpotato/core/plugins/file/main.py +++ b/couchpotato/core/plugins/file/main.py @@ -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: