From e8544d7b0c67b62596b219a9b83868ff3a52b1f2 Mon Sep 17 00:00:00 2001 From: Jonathon Jongsma Date: Thu, 13 May 2010 11:33:05 -0500 Subject: Add support for epiphany with the webkit backend When they moved to webkit as the browser engine, epiphany changed the location of their cookies database, but the format remained the same. This patch adds support for the new location, but falls back to the old location if the new one doesn't exist. https://bugzilla.gnome.org/show_bug.cgi?id=609668 --- git-bz | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/git-bz b/git-bz index 941b636..6555566 100755 --- a/git-bz +++ b/git-bz @@ -492,8 +492,14 @@ def get_bugzilla_cookies_ff3(host): return get_cookies_from_sqlite_xulrunner(host, cookies_sqlite, "Firefox") def get_bugzilla_cookies_epy(host): - ff_dir = os.path.expanduser('~/.gnome2/epiphany/mozilla/epiphany') - cookies_sqlite = os.path.join(ff_dir, "cookies.sqlite") + # epiphany-webkit migrated the cookie db to a different location, but the + # format is the same + profile_dir = os.path.expanduser('~/.gnome2/epiphany') + cookies_sqlite = os.path.join(profile_dir, "cookies.sqlite") + if not os.path.exists(cookies_sqlite): + # try the old location + cookies_sqlite = os.path.join(profile_dir, "mozilla/epiphany/cookies.sqlite") + if not os.path.exists(cookies_sqlite): raise CookieError("%s doesn't exist" % cookies_sqlite) -- cgit v1.2.3