[tracker/tracker-0.10-nb276745: 5/8] tracker-extract, icon: Ignore images in certain directories
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10-nb276745: 5/8] tracker-extract, icon: Ignore images in certain directories
- Date: Tue, 18 Oct 2011 10:28:34 +0000 (UTC)
commit 47aa5b0375f9ea9075f78e8dfc5ef2b745958533
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Oct 18 12:22:18 2011 +0200
tracker-extract, icon: Ignore images in certain directories
src/tracker-extract/tracker-extract-icon.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-icon.c b/src/tracker-extract/tracker-extract-icon.c
index 0a6185f..e79a32d 100644
--- a/src/tracker-extract/tracker-extract-icon.c
+++ b/src/tracker-extract/tracker-extract-icon.c
@@ -22,6 +22,8 @@
#include <libtracker-common/tracker-file-utils.h>
#include <libtracker-extract/tracker-extract.h>
+#include "tracker-main.h"
+
static void extract_icon (const gchar *filename,
TrackerSparqlBuilder *preupdate,
TrackerSparqlBuilder *metadata);
@@ -140,6 +142,16 @@ extract_icon (const gchar *uri,
{
guint max_width;
guint max_height;
+ gchar *filename;
+
+ filename = g_filename_from_uri (uri, NULL, NULL);
+
+ if (tracker_main_is_file_ignored_in_image_directories (filename)) {
+ g_free (filename);
+ return;
+ }
+
+ g_free (filename);
/* The Windows Icon file format may contain the same icon with different
* sizes inside, so there's no clear way of setting single width and
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]