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 674986 - Use new GTK bookmarks location
Use new GTK bookmarks location
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Bookmarks
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on: 646631
Blocks:
 
 
Reported: 2012-04-27 17:31 UTC by William Jon McCann
Modified: 2012-04-30 14:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use new GTK bookmarks location (2.21 KB, patch)
2012-04-27 17:32 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2012-04-27 17:31:23 UTC
A consequence of bug 646631 will be that the default bookmarks location will change to ~/.config/gtk/bookmarks. Will attach a patch to support that in Nautilus.
Comment 1 William Jon McCann 2012-04-27 17:32:18 UTC
Created attachment 212989 [details] [review]
Use new GTK bookmarks location

If it doesn't exist fallback to reading from the old location but
always write to the new location.
Comment 2 Cosimo Cecchi 2012-04-27 18:12:32 UTC
Review of attachment 212989 [details] [review]:

::: src/nautilus-bookmark-list.c
@@ +517,3 @@
+	if (!g_file_query_exists (file, NULL)) {
+		file = nautilus_bookmark_list_get_legacy_file ();
+	}

Unfortunately we can't really trigger sync I/O in this code path, since the home directory might be e.g. on a NFS share and this will be called frequently.
You will have to wrap this in an async operation, or wrap both the g_file_load_contents() and the g_file_query_info() operations in a thread e.g. with g_simple_async_result_run_in_thread() or g_io_scheduler_push_job().

@@ +605,3 @@
+	g_mkdir_with_parents (path, 0700);
+	g_free (path);
+	g_object_unref (parent);

Same here, g_mkdir_with_parents() will do sync I/O.
Comment 3 Cosimo Cecchi 2012-04-30 14:17:59 UTC
Attachment 212989 [details] pushed as ed90577 - Use new GTK bookmarks location

Pushed to master with an additional patch to always avoid sync I/O while loading/saving the file.