Commit 33f67302 authored by Colin Walters's avatar Colin Walters

GtkBookmarksManager: Only save if we have data to save

Otherwise we write an empty file, which is lame.
parent 4f01c0b1
......@@ -221,7 +221,8 @@ _gtk_bookmarks_manager_new (GtkBookmarksChangedFunc changed_func, gpointer chang
/* Read the legacy one and write it to the new one */
legacy_bookmarks_file = get_legacy_bookmarks_file ();
manager->bookmarks = read_bookmarks (legacy_bookmarks_file);
save_bookmarks (bookmarks_file, manager->bookmarks);
if (manager->bookmarks)
save_bookmarks (bookmarks_file, manager->bookmarks);
g_object_unref (legacy_bookmarks_file);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment