[rhythmbox] file-helpers: don't ignore files when we don't get access::can-read



commit a57a51913b1057c85603bf3ada52f6d76582d139
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Apr 18 13:25:18 2010 +1000

    file-helpers: don't ignore files when we don't get access::can-read

 lib/rb-file-helpers.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/lib/rb-file-helpers.c b/lib/rb-file-helpers.c
index 5a0f96d..1b121af 100644
--- a/lib/rb-file-helpers.c
+++ b/lib/rb-file-helpers.c
@@ -714,8 +714,17 @@ static gboolean
 _should_process (GFileInfo *info)
 {
 	/* check that the file is non-hidden and readable */
-	return (g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ) &&
-		(g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN) == FALSE));
+	if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ)) {
+		if (g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ) == FALSE) {
+			return FALSE;
+		}
+	}
+	if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN)) {
+		if (g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN)) {
+			return FALSE;
+		}
+	}
+	return TRUE;
 }
 
 static void



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