After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 775094 - Avoid races in operations progress reproting
Avoid races in operations progress reproting
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-25 16:12 UTC by Carlos Soriano
Modified: 2016-11-25 16:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
progress-info: avoid races (5.15 KB, patch)
2016-11-25 16:12 UTC, Carlos Soriano
committed Details | Review
file-operations: don't recurse for trash operations (1.43 KB, patch)
2016-11-25 16:12 UTC, Carlos Soriano
committed Details | Review

Description Carlos Soriano 2016-11-25 16:12:44 UTC
.
Comment 1 Carlos Soriano 2016-11-25 16:12:48 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.
Comment 2 Carlos Soriano 2016-11-25 16:12:53 UTC
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.
Comment 3 Carlos Soriano 2016-11-25 16:14:18 UTC
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