Skip to content

Commit

Permalink
Fix DatabaseError: no such table: moz_favicons
Browse files Browse the repository at this point in the history
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 #261

Closes #251

Also related
- https://www.bleachbit.org/forum/firefox-55
- https://bugs.launchpad.net/linuxmint/+bug/1738086
  • Loading branch information
az0 committed Dec 15, 2017
1 parent 3f63ef0 commit fc8e1dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bleachbit/Special.py
Expand Up @@ -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 " \
Expand Down

0 comments on commit fc8e1dd

Please sign in to comment.