[Tracker] Fix for NoWatchDirectories



Hi everyone,

First of all, thanks for Tracker, its already great, and it's only
0.0.4 :-). I wanted to index aIl subdirectories in my HOME except for
one, and realised that the NoWatchDirectory entry in tracker.cfg had
no effect. I figured this should be a colon-separated list of
directories to ignore, here's a patch that fixes it for me:

--- tracker-0.0.4/src/trackerd/tracker-utils.c  2006-05-06
12:10:03.000000000 -0500
+++ tracker-0.0.4-new/src/trackerd/tracker-utils.c      2006-07-07
16:26:32.000000000 -0500
@@ -1162,9 +1162,8 @@
                       mystr = g_strconcat (dir,"/", str , NULL);
                       g_free (str);

-                       if (!dir_only || (dir_only &&
tracker_is_directory (mystr))) {
+                       if (!dir_only || (dir_only &&
tracker_is_directory (mystr) &&
g_slist_find_custom(no_watch_directory_list, mystr,
(GCompareFunc)strcmp) == NULL))
                               file_list = g_slist_prepend
(file_list, g_strdup (mystr));
-                       }

                       g_free (mystr);

@@ -1173,7 +1172,7 @@
               closedir (dirp);
       }
       return file_list;
-}
+}

void
tracker_get_dirs (const char *dir, GSList **file_list)

Attachment: no_watch_dirs.patch
Description: Binary data



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