[tracker/tracker-0.10-no-atime: 19/23] tracker-extract, pdf: O_NOATIME requires owner to match, allow fallback



commit a0f102630854c04fae93a3dfced30d9a05cfd68d
Author: Philip Van Hoof <philip codeminded be>
Date:   Fri Sep 23 11:47:36 2011 +0200

    tracker-extract, pdf: O_NOATIME requires owner to match, allow fallback

 src/tracker-extract/tracker-extract-pdf.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-pdf.c b/src/tracker-extract/tracker-extract-pdf.c
index 8748c10..04052da 100644
--- a/src/tracker-extract/tracker-extract-pdf.c
+++ b/src/tracker-extract/tracker-extract-pdf.c
@@ -314,6 +314,9 @@ extract_pdf (const gchar          *uri,
 	filename = g_filename_from_uri (uri, NULL, NULL);
 
 	fd = g_open (filename, O_RDONLY | O_NOATIME, 0);
+	if (fd == -1 && errno == EPERM) {
+		fd = g_open (filename, O_RDONLY, 0);
+	}
 
 	if (fd == -1) {
 		g_warning ("Could not open pdf file '%s': %s\n",



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