[Xfce-bugs] [Bug 15367] Regression: thunar detects writable share as being read-only
bugzilla-daemon at xfce.org
bugzilla-daemon at xfce.org
Thu May 9 00:00:23 CEST 2019
https://bugzilla.xfce.org/show_bug.cgi?id=15367
--- Comment #4 from lectrode <electrodexsnet at gmail.com> ---
If I have time, I might look into that. If I were to guess, I'd say it's likely
due to a limitation or bug in the way the share is mounted via gvfs/fuse.
Also, just noticed a minor flaw in the patch code above. The curly bracket I
added at the end needs to be before the "g_object_unref (G_OBJECT
(dest_info));", as un-referencing that variable should not be dependent on the
conditional I added. I'd edit the previous comment, but that doesn't appear to
be possible with this site.
Fixed patch:
@@ -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