[file-roller] fr-new-archive-dialog: Do not fail if access::can-write is not set
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] fr-new-archive-dialog: Do not fail if access::can-write is not set
- Date: Tue, 27 Sep 2016 05:59:04 +0000 (UTC)
commit 586c123b0feb22e937c918e2d48469094665481c
Author: Ondrej Holy <oholy redhat com>
Date: Tue Jun 14 10:44:51 2016 +0200
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.
https://bugzilla.gnome.org/show_bug.cgi?id=688714
src/fr-new-archive-dialog.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/fr-new-archive-dialog.c b/src/fr-new-archive-dialog.c
index 46dc930..594bf22 100644
--- a/src/fr-new-archive-dialog.c
+++ b/src/fr-new-archive-dialog.c
@@ -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),
GTK_DIALOG_MODAL,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]