Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | Index: 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 | |