diff options
author | Bastien Nocera <hadess@hadess.net> | 2017-06-21 18:03:31 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-06-21 18:06:52 +0200 |
commit | e74533f499971601e6b04f48b494f2795a8df5fe (patch) | |
tree | d861c97d5a48febbbc9339a2aa2cb948ebed6d42 | |
parent | 73d57e0457c738880b7e0d4a364b11f7e50ca011 (diff) | |
download | nautilus-sendto-e74533f499971601e6b04f48b494f2795a8df5fe.tar.gz |
main: Assume file is readable if "can-read" is missing
Rather than ignoring filesystems which don't set this attribute.
-rw-r--r-- | 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")) |