GNOME Bugzilla – Bug 775094
Avoid races in operations progress reproting
Last modified: 2016-11-25 16:14:27 UTC
.
Created attachment 340769 [details] [review] progress-info: avoid races We were not checking whether the operations was aborted from the user side when setting the details,so that could make a race and the info thread setting the details to canceled and the operation thread setting the details too afterwards before realizing the operations was canceled. To fix it, always check whether the info progress was canceled or not.
Created attachment 340770 [details] [review] file-operations: don't recurse for trash operations We were scanning the sources as we do for copy and move operations, and to count the files we were recursing inside directories. However, the trash operation doesn't recurse at all, so the operation progress was wrong. Instead of that, don't recurse for counting the number of files, so the trash progress is correct. Although is not coherent with the rest of the operations, recursing for just showing all the files in the progress would be extremely counterproductive.
I think it's pretty obvious, so pushing directly, feel free to complain! Attachment 340769 [details] pushed as 27783cc - progress-info: avoid races Attachment 340770 [details] pushed as d4a4f79 - file-operations: don't recurse for trash operations