[tracker/tracker-0.10-no-atime: 15/23] libtracker-common: O_NOATIME requires owner to match, have a fallback
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10-no-atime: 15/23] libtracker-common: O_NOATIME requires owner to match, have a fallback
- Date: Fri, 23 Sep 2011 11:04:55 +0000 (UTC)
commit 628d4eb10db5578d66b6da12c7d31ae95eadfb6f
Author: Philip Van Hoof <philip codeminded be>
Date: Fri Sep 23 11:42:28 2011 +0200
libtracker-common: O_NOATIME requires owner to match, have a fallback
src/libtracker-common/tracker-file-utils.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-common/tracker-file-utils.c b/src/libtracker-common/tracker-file-utils.c
index f60e624..e2891ab 100644
--- a/src/libtracker-common/tracker-file-utils.c
+++ b/src/libtracker-common/tracker-file-utils.c
@@ -60,6 +60,9 @@ tracker_file_open (const gchar *path)
#if defined(__linux__)
fd = g_open (path, O_RDONLY | O_NOATIME);
+ if (fd == -1 && errno == EPERM) {
+ fd = g_open (path, O_RDONLY);
+ }
#else
fd = g_open (path, O_RDONLY);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]