[nautilus-sendto] main: Assume file is readable if "can-read" is missing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-sendto] main: Assume file is readable if "can-read" is missing
- Date: Wed, 21 Jun 2017 16:07:28 +0000 (UTC)
commit e74533f499971601e6b04f48b494f2795a8df5fe
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jun 21 18:03:31 2017 +0200
main: Assume file is readable if "can-read" is missing
Rather than ignoring filesystems which don't set this attribute.
src/nautilus-sendto.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-sendto.c b/src/nautilus-sendto.c
index ab178f1..5a5163a 100644
--- a/src/nautilus-sendto.c
+++ b/src/nautilus-sendto.c
@@ -502,10 +502,14 @@ nautilus_sendto_init (NautilusSendto *nst)
continue;
}
- if (g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ) == FALSE) {
- g_debug ("'%s' is not readable", filenames[i]);
- g_object_unref (info);
- continue;
+ 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) {
+ g_debug ("'%s' is not readable", filenames[i]);
+ g_object_unref (info);
+ continue;
+ }
+ } else {
+ g_debug ("No can-read attribute for '%s', assuming it is", filenames[i]);
}
mimetype = g_file_info_get_attribute_string (info,
G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE);
if (g_str_equal (mimetype, "inode/directory"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]