[tracker] tracker-extract, mp3: Also check for errno for fallback for open



commit 3f88e64ca74da40eafd7005b3c1f7f0347e4f671
Author: Philip Van Hoof <philip codeminded be>
Date:   Fri Sep 23 11:51:12 2011 +0200

    tracker-extract, mp3: Also check for errno for fallback for open

 src/tracker-extract/tracker-extract-mp3.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 83c3970..71ceed1 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -2097,7 +2097,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
 	 * permissions.
 	 */
 	fd = g_open (filename, O_RDONLY | O_NOATIME);
-	if (fd == -1) {
+	if (fd == -1 && errno == EPERM) {
 		fd = g_open (filename, O_RDONLY);
 
 		if (fd == -1) {



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