[tracker/tracker-0.10-no-atime: 20/23] tracker-extract, text: O_NOATIME requires owner to match, allow fallback
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10-no-atime: 20/23] tracker-extract, text: O_NOATIME requires owner to match, allow fallback
- Date: Fri, 23 Sep 2011 11:05:20 +0000 (UTC)
commit f4608e15c346b4f1f5aab0d0cf667457db4f4521
Author: Philip Van Hoof <philip codeminded be>
Date: Fri Sep 23 11:49:33 2011 +0200
tracker-extract, text: O_NOATIME requires owner to match, allow fallback
src/tracker-extract/tracker-extract-text.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-text.c b/src/tracker-extract/tracker-extract-text.c
index 9468ec8..b1db4fc 100644
--- a/src/tracker-extract/tracker-extract-text.c
+++ b/src/tracker-extract/tracker-extract-text.c
@@ -70,6 +70,9 @@ get_file_content (const gchar *uri,
path = g_filename_from_uri (uri, NULL, NULL);
fd = g_open (path, O_RDONLY | O_NOATIME, 0);
+ if (fd == -1 && errno == EPERM) {
+ fd = g_open (path, O_RDONLY, 0);
+ }
if (fd == -1) {
g_message ("Could not open file '%s': %s",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]