From ffcd71cbcfba60fffe9bf18dbc97bfc662416de5 Mon Sep 17 00:00:00 2001 From: Lectrode Date: Wed, 8 May 2019 12:05:51 -0700 Subject: [PATCH] ignore null value for destination write attribute Signed-off-by: Lectrode --- thunar/thunar-transfer-job.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/thunar/thunar-transfer-job.c b/thunar/thunar-transfer-job.c index 47fa3bfc..be1344bc 100644 --- a/thunar/thunar-transfer-job.c +++ b/thunar/thunar-transfer-job.c @@ -835,16 +835,18 @@ thunar_transfer_job_verify_destination (ThunarTransferJob *transfer_job, if (dest_info != NULL) { - if (!g_file_info_get_attribute_boolean (dest_info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) - { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_READ_ONLY, - _("Error while copying to \"%s\": The destination is read-only"), - dest_name); - - succeed = FALSE; - } - - g_object_unref (G_OBJECT (dest_info)); + if (g_file_info_get_attribute_boolean (dest_info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE) != NULL) + { + if (!g_file_info_get_attribute_boolean (dest_info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_READ_ONLY, + _("Error while copying to \"%s\": The destination is read-only"), + dest_name); + + succeed = FALSE; + } + } + g_object_unref (G_OBJECT (dest_info)); } } -- 2.21.0