From fc8e1ddb17b96e9819bd545aec744cb57bfb1da0 Mon Sep 17 00:00:00 2001 From: Andrew Ziem Date: Fri, 15 Dec 2017 14:51:36 -0700 Subject: [PATCH] Fix DatabaseError: no such table: moz_favicons Tested with System1, has moz_favicons Firefox 57.0.2 Windows 10.0.16299 System2, does not have moz_favicons Ubuntu 16.04.03 Firefox/57.0 Closes https://github.com/bleachbit/bleachbit/issues/261 Closes https://github.com/bleachbit/bleachbit/issues/251 Also related - https://www.bleachbit.org/forum/firefox-55 - https://bugs.launchpad.net/linuxmint/+bug/1738086 --- bleachbit/Special.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bleachbit/Special.py b/bleachbit/Special.py index 005b3811d..c48679df4 100644 --- a/bleachbit/Special.py +++ b/bleachbit/Special.py @@ -260,8 +260,9 @@ def delete_mozilla_url_history(path): fav_suffix = "where id not in (select favicon_id " \ "from moz_places where favicon_id is not null ); " - cols = ('url', 'data') - cmds += __shred_sqlite_char_columns('moz_favicons', cols, fav_suffix) + if __sqlite_table_exists(path, 'moz_favicons'): + cols = ('url', 'data') + cmds += __shred_sqlite_char_columns('moz_favicons', cols, fav_suffix) # delete any orphaned history visits cmds += "delete from moz_historyvisits where place_id not " \