[tracker/tracker-0.12: 98/202] libtracker-common: O_NOATIME requires owner to match, have a fallback
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.12: 98/202] libtracker-common: O_NOATIME requires owner to match, have a fallback
- Date: Thu, 6 Oct 2011 17:56:41 +0000 (UTC)
commit efdb2b110d28b4a6ceb7422b2c9f7a9a84336330
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]