From 0903d1f646a2f1de5c5a71478182ebb11d21faf3 Mon Sep 17 00:00:00 2001 From: Andrew Ziem Date: Fri, 1 Aug 2014 15:19:02 -0600 Subject: [PATCH] Linux: Pass control of the ~/.cache/mozilla directory from the System - Cache cleaner to the Firefox - Cache cleaner (LP#1295826) --- bleachbit/Cleaner.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bleachbit/Cleaner.py b/bleachbit/Cleaner.py index 56d6e9c35..ab425a03e 100644 --- a/bleachbit/Cleaner.py +++ b/bleachbit/Cleaner.py @@ -239,6 +239,10 @@ def get_commands(self, option_id): if 'nt' == os.name: dirs += FileUtilities.expand_glob_join( cache_base, "jumpListCache") # Windows 8 + if 'posix' == os.name: + # This path is whitelisted under the System - Cache cleaner, + # so it can be cleaned here. + dirs += [ os.path.expanduser('~/.cache/mozilla') ] for dirname in dirs: for filename in children_in_directory(dirname, False): yield Command.Delete(filename) @@ -756,6 +760,8 @@ def whitelisted(self, pathname): '^/tmp/pulse-[^/]+/pid$', '^/var/tmp/kdecache-'] regexes.append('^' + os.path.expanduser('~/.cache/wallpaper/')) + # Clean Firefox cache from Firefox cleaner (LP#1295826) + regexes.append('^' + os.path.expanduser('~/.cache/mozilla')) regexes.append( '^' + os.path.expanduser('~/.cache/gnome-control-center/')) for regex in regexes: