After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774785 - Bookmarks are never migrated
Bookmarks are never migrated
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Bookmarks
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 772865 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-11-21 13:02 UTC by Carlos Garcia Campos
Modified: 2016-11-21 14:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bookmarks: Add ephy_bookmarks_manager_new() (3.71 KB, patch)
2016-11-21 13:03 UTC, Carlos Garcia Campos
committed Details | Review
Fix bookmarks migration (2.54 KB, patch)
2016-11-21 13:04 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2016-11-21 13:02:28 UTC
EphyBookmarksManager always creates an empty bookmarks.gvdb on its init method, and migrate_bookmarks() checks whether bookmarks.gvdb already exists to avoid migrating the bookmarks twice. Since migrate_bookmarks()creates the EphyBookmarksManager before checking for bookmarks.gvdb, it always exists and bookmarks are never migrated. This is a regression introduced in commit 54006df8dba31a5a58686e7d2473d64f3e454683
Comment 1 Carlos Garcia Campos 2016-11-21 13:03:37 UTC
Created attachment 340419 [details] [review]
bookmarks: Add ephy_bookmarks_manager_new()
Comment 2 Carlos Garcia Campos 2016-11-21 13:04:07 UTC
Created attachment 340420 [details] [review]
Fix bookmarks migration
Comment 3 Carlos Garcia Campos 2016-11-21 13:05:17 UTC
I had to manually downgrade the migration number in .migrated file. I don't even know why the manager needs to write the file in the init method, but assuming that's done a for a reason this looks like the simpler fix.
Comment 4 Michael Catanzaro 2016-11-21 14:26:49 UTC
*** Bug 772865 has been marked as a duplicate of this bug. ***
Comment 5 Michael Catanzaro 2016-11-21 14:29:56 UTC
Review of attachment 340419 [details] [review]:

r+
Comment 6 Michael Catanzaro 2016-11-21 14:35:08 UTC
Review of attachment 340420 [details] [review]:

Took me a while before I realized that filename changes there in the middle. OK, thanks.
Comment 7 Carlos Garcia Campos 2016-11-21 14:37:52 UTC
(In reply to Michael Catanzaro from comment #6)
> Review of attachment 340420 [details] [review] [review]:
> 
> Took me a while before I realized that filename changes there in the middle.
> OK, thanks.

It took me a while to follow the previous code with the gotos :-)