[Xfce-bugs] [Bug 15367] Regression: thunar detects writable share as being read-only
bugzilla-daemon at xfce.org
bugzilla-daemon at xfce.org
Wed May 8 21:15:47 CEST 2019
https://bugzilla.xfce.org/show_bug.cgi?id=15367
--- Comment #2 from lectrode <electrodexsnet at gmail.com> ---
While I'm not very familiar with C, I think I may have found the issue. In this
particular instance, the following returns "null" instead of true or false:
thunar/thunar-transfer-job.c [in line 838]:
g_file_info_get_attribute_boolean (dest_info,
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)
Adding the following conditional appears to solve the issue:
@@ -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));
+ }
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Xfce-bugs
mailing list