[tracker/tracker-0.10-nb276745: 3/8] tracker-extract, gif: Ignore images in certain directories



commit ae938d51f36388aa46e621b71ec8ba5498b0421a
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Oct 18 12:21:41 2011 +0200

    tracker-extract, gif: Ignore images in certain directories

 src/tracker-extract/tracker-extract-gif.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gif.c b/src/tracker-extract/tracker-extract-gif.c
index ec6ed47..27afcf8 100644
--- a/src/tracker-extract/tracker-extract-gif.c
+++ b/src/tracker-extract/tracker-extract-gif.c
@@ -37,6 +37,8 @@
 
 #include <libtracker-extract/tracker-extract.h>
 
+#include "tracker-main.h"
+
 #define XMP_MAGIC_TRAILER_LENGTH 256
 #define EXTENSION_RECORD_COMMENT_BLOCK_CODE 0xFE
 
@@ -561,6 +563,11 @@ extract_gif (const gchar          *uri,
 		return;
 	}
 
+	if (tracker_main_is_file_ignored_in_image_directories (filename)) {
+		g_free (filename);
+		return;
+	}
+
 	fd = g_open (filename, O_RDONLY | O_NOATIME, 0);
 	if (fd == -1 && errno == EPERM) {
 		fd = g_open (filename, O_RDONLY, 0);



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