[tracker/tracker-0.8] Bug 614610 - config behaviour regarding xdg-user-dirs doesn't work properly.



commit aa2523fd2283b844c364af7379d74a58ce21cbc3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed May 19 12:51:11 2010 +0200

    Bug 614610 - config behaviour regarding xdg-user-dirs doesn't work properly.
    
    Make $HOME take precedence over XDG dirs pointing to it when saving
    directory aliases in the configuration file.

 src/miners/fs/tracker-config.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/miners/fs/tracker-config.c b/src/miners/fs/tracker-config.c
index ff34717..0bea3b4 100644
--- a/src/miners/fs/tracker-config.c
+++ b/src/miners/fs/tracker-config.c
@@ -1005,7 +1005,12 @@ config_save (TrackerConfig *config)
 					 * breaks. Need a better
 					 * solution at some point.
 					 */
-					if (g_strcmp0 (l->data, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0) {
+					if (g_strcmp0 (l->data, g_get_home_dir ()) == 0) {
+						/* Home dir gets straight into configuration,
+						 * regardless of having XDG dirs pointing to it.
+						 */
+						path_to_use = "$HOME";
+					} else if (g_strcmp0 (l->data, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0) {
 						path_to_use = "&DESKTOP";
 					} else if (g_strcmp0 (l->data, g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS)) == 0) {
 						path_to_use = "&DOCUMENTS";



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]