[nautilus] file-operations: fix crash when copying



commit 04c6c58e33f60908ceec7d9ea8a130aff0c2a8d2
Author: Carlos Soriano <csoriano gnome org>
Date:   Tue Sep 8 16:19:02 2015 +0200

    file-operations: fix crash when copying
    
    Commit 2db9a295 introduced an obvious crash, not sure how
    I managed to make it in if it was part of the tests and seems
    it was working for other people.
    Anyway, we were using the wrong argument, which pointed
    to a wrong address when reporting operations, and that was
    causing a crash.
    
    To fix it, remove the  spurious argument.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753282

 libnautilus-private/nautilus-file-operations.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index e031589..d780660 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -3217,8 +3217,8 @@ report_copy_progress (CopyMoveJob *copy_job,
                                nautilus_progress_info_take_status (job->progress,
                                                                    f (status,
                                                                       copy_job->fake_display_source != NULL ?
-                                                                      copy_job->fake_display_source :
-                                                                      (GFile *)copy_job->files->data,
+                                                                               copy_job->fake_display_source 
:
+                                                                               (GFile 
*)copy_job->files->data,
                                                                       copy_job->destination));
                        } else {
                                 if (files_left > 0) {
@@ -3245,8 +3245,7 @@ report_copy_progress (CopyMoveJob *copy_job,
                                        nautilus_progress_info_take_status (job->progress,
                                                                            f (status,
                                                                               source_info->num_files,
-                                                                              (GFile *)copy_job->destination,
-                                                                              copy_job->destination));
+                                                                              (GFile 
*)copy_job->destination));
                                 } else {
                                         if (is_move) {
                                                 status = ngettext ("Moved %'d file to “%B”",
@@ -3260,8 +3259,7 @@ report_copy_progress (CopyMoveJob *copy_job,
                                        nautilus_progress_info_take_status (job->progress,
                                                                            f (status,
                                                                               source_info->num_files,
-                                                                              (GFile *)copy_job->destination,
-                                                                              copy_job->destination));
+                                                                              (GFile 
*)copy_job->destination));
                                 }
                        } else {
                                 GFile *parent;
@@ -3274,7 +3272,6 @@ report_copy_progress (CopyMoveJob *copy_job,
                                        nautilus_progress_info_take_status (job->progress,
                                                                            f (status,
                                                                               transfer_info->num_files + 1,
-                                                                              source_info->num_files,
                                                                               parent));
                                 } else {
                                         status = ngettext ("Duplicated %'d file in “%B”",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]