summaryrefslogtreecommitdiffstats
path: root/meta-gnome/recipes-support/tracker/tracker-0.14.2/fix-removable-media-detection.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-gnome/recipes-support/tracker/tracker-0.14.2/fix-removable-media-detection.patch')
-rw-r--r--meta-gnome/recipes-support/tracker/tracker-0.14.2/fix-removable-media-detection.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta-gnome/recipes-support/tracker/tracker-0.14.2/fix-removable-media-detection.patch b/meta-gnome/recipes-support/tracker/tracker-0.14.2/fix-removable-media-detection.patch
new file mode 100644
index 000000000..6c3d9de10
--- /dev/null
+++ b/meta-gnome/recipes-support/tracker/tracker-0.14.2/fix-removable-media-detection.patch
@@ -0,0 +1,30 @@
1Index: tracker-0.14.2/src/libtracker-miner/tracker-storage.c
2===================================================================
3--- tracker-0.14.2.orig/src/libtracker-miner/tracker-storage.c 2011-08-03 13:53:16.000000000 +0100
4+++ tracker-0.14.2/src/libtracker-miner/tracker-storage.c 2012-09-10 08:25:18.322215126 +0100
5@@ -20,6 +20,7 @@
6 #include "config.h"
7
8 #include <string.h>
9+#include <sys/stat.h>
10
11 #include <gio/gio.h>
12 #include <gio/gunixmounts.h>
13@@ -646,6 +647,17 @@
14 gchar *content_type;
15 gboolean is_multimedia;
16 gboolean is_blank;
17+ struct stat st;
18+
19+ /*
20+ * Consider all files under /media to be
21+ * removable unless the file .this-is-root is
22+ * present.
23+ */
24+ if (!strncmp (mount_path, "/media/",
25+ strlen ("/media/")) &&
26+ stat ("/media/.this-is-root", &st))
27+ is_removable = TRUE;
28
29 content_type = mount_guess_content_type (mount, &is_optical, &is_multimedia, &is_blank);
30