[Xfce-bugs] [Bug 15727] Replacing a file via Cut and Paste in the same filesystem makes a copy

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Sun Aug 25 14:41:44 CEST 2019


https://bugzilla.xfce.org/show_bug.cgi?id=15727

--- Comment #15 from Reuben Green <reubengreen73 at gmail.com> ---
Thanks for the comments!

Yes, only "replace confirmed" is stored, but that is all that is needed (I
think), since if the user responds THUNAR_JOB_RESPONSE_NO then the node in
question is removed from the transfer job and is not passed on to the fallback
code (there's a comment about this on lines 1029 to 1031), so no second dialog
appears.

In more detail, if the "retry" block on lines 1002 to 1033 is entered, then err
is reset to NULL and the call to thunar_job_ask_replace will return one of
THUNAR_JOB_RESPONSE_YES, _NO, or _CANCEL.
>> If _YES, then the g_file_move is retried and move_successful and err are updated to reflect the outcome of this call.
>> If _CANCEL, then we free all of the nodes in the job, leave err as NULL and break out of the loop, which results in the call to thunar_transfer_job_execute returning without error (as there was no error, the user just opted to cancel). >> If _NO, then we do nothing, leaving err as NULL and move_successful as FALSE. Thus we enter the block on lines 1036 to 1055 and free the node associated to this file (so that it is not passed on to the copy+delete fallback code), then continue with the loop to deal with any further transfer operations in the job.

I hope that makes sense!

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list