diff options
author | Carlos Soriano <csoriano@gnome.org> | 2016-11-24 13:32:02 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-12-10 00:33:38 +0100 |
commit | acc282ce4e391a3d197082ec26973c6764c277d5 (patch) | |
tree | 822a370f10f882bcbc0a8e5775215f4056b4576d | |
parent | fdc903f56073e73cca0abe05dd11f672d2ce43f5 (diff) | |
download | nautilus-acc282ce4e391a3d197082ec26973c6764c277d5.tar.gz |
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.
https://bugzilla.gnome.org/show_bug.cgi?id=775094
-rw-r--r-- | src/nautilus-file-operations.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c index c491daf79..eaf8cd4bb 100644 --- a/src/nautilus-file-operations.c +++ b/src/nautilus-file-operations.c @@ -3348,7 +3348,9 @@ retry: count_file (info, job, source_info); - if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) + /* trashing operation doesn't recurse */ + if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY && + source_info->op != OP_KIND_TRASH) { g_queue_push_head (dirs, g_object_ref (file)); } |