tracker r2354 - in trunk: . po src/libtracker-common
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2354 - in trunk: . po src/libtracker-common
- Date: Fri, 10 Oct 2008 15:40:39 +0000 (UTC)
Author: mr
Date: Fri Oct 10 15:40:38 2008
New Revision: 2354
URL: http://svn.gnome.org/viewvc/tracker?rev=2354&view=rev
Log:
* POTFILES.in: Fixed from make check.
* src/libtracker-common/tracker-file-utils.c:
(tracker_path_hash_table_filter_duplicates),
(tracker_path_list_filter_duplicates): In both these functions
strip any trailing G_DIR_SEPARATOR from paths since that is the
format we use. Ivan't test case showed that I didn't do this in my
reimplementation and also from that I realised the hash table
variant wasn't removing the trailing G_DIR_SEPARATOR either.
Modified:
trunk/ChangeLog
trunk/po/ChangeLog
trunk/po/POTFILES.in
trunk/src/libtracker-common/tracker-file-utils.c
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Fri Oct 10 15:40:38 2008
@@ -13,6 +13,7 @@
src/tracker-applet/tracker-applet.c
src/tracker-applet/tracker-applet.desktop.in.in
src/tracker-applet/tracker-applet-prefs.glade
+src/tracker-extract/tracker-extract.c
src/tracker-indexer/tracker-indexer.c
src/tracker-indexer/tracker-main.c
src/tracker-preferences/tracker-preferences.c
Modified: trunk/src/libtracker-common/tracker-file-utils.c
==============================================================================
--- trunk/src/libtracker-common/tracker-file-utils.c (original)
+++ trunk/src/libtracker-common/tracker-file-utils.c Fri Oct 10 15:40:38 2008
@@ -485,6 +485,7 @@
g_hash_table_iter_init (&iter1, roots);
while (g_hash_table_iter_next (&iter1, &key, NULL)) {
const gchar *path;
+ gchar *p;
path = key;
@@ -514,6 +515,15 @@
break;
}
}
+
+ /* Make sure the path doesn't have the '/' suffix. */
+ p = strrchr (path, G_DIR_SEPARATOR);
+
+ if (p) {
+ if (*(p + 1) == '\0') {
+ *p = '\0';
+ }
+ }
}
#ifdef TESTING
@@ -544,6 +554,7 @@
while (l1) {
const gchar *path;
+ gchar *p;
gboolean reset = FALSE;
path = l1->data;
@@ -586,6 +597,16 @@
l2 = l2->next;
}
+ /* Make sure the path doesn't have the '/' suffix. */
+ p = strrchr (path, G_DIR_SEPARATOR);
+
+ if (p) {
+ if (*(p + 1) == '\0') {
+ *p = '\0';
+ }
+ }
+
+ /* Continue in list unless reset. */
if (G_LIKELY (!reset)) {
l1 = l1->next;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]