Commit 586c123b authored by Ondrej Holy's avatar Ondrej Holy Committed by Paolo Bacchilega

fr-new-archive-dialog: Do not fail if access::can-write is not set

Some file info attributes can't be reliably set for remote filesystem
and thus they are unset. Use g_file_info_has_attribute to check whether
attribute is set. Do not fail if the attribute is not set.
parent fb46c103
......@@ -425,7 +425,8 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog *self,
return NULL;
if (! g_file_info_get_attribute_boolean (parent_info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) {
if (g_file_info_has_attribute (parent_info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE) &&
! g_file_info_get_attribute_boolean (parent_info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) {
dialog = _gtk_error_dialog_new (GTK_WINDOW (self),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment