[gparted/psusi/refactor: 12/19] Remove simulation pass ( read test ) on move



commit 6cd216945adc2a26650f1cde1a6785641b082cae
Author: Phillip Susi <psusi ubuntu com>
Date:   Sat Jan 26 13:43:30 2013 -0500

    Remove simulation pass ( read test ) on move
    
    The simulation pass is unnecessary and just wastes more time when moving,
    so get rid of it.

 src/GParted_Core.cc |   34 ++++++++++++++--------------------
 1 files changed, 14 insertions(+), 20 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 431a8bb..05a3a34 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -2146,27 +2146,21 @@ bool GParted_Core::move_filesystem( const Partition & partition_old,
                        succes = false ;
                        if ( partition_new .test_overlap( partition_old ) )
                        {
-                               if ( copy_filesystem_simulation( partition_old, partition_new, 
operationdetail .get_last_child() ) )
+                               succes = copy_filesystem( partition_old,
+                                                         partition_new,
+                                                         operationdetail.get_last_child(),
+                                                         total_done,
+                                                         true );
+
+                               operationdetail.get_last_child().get_last_child()
+                                       .set_status( succes ? STATUS_SUCCES : STATUS_ERROR );
+                               if ( ! succes )
                                {
-                                       operationdetail .get_last_child() .add_child( OperationDetail( 
_("perform real move") ) ) ;
-                                       
-                                       succes = copy_filesystem( partition_old,
-                                                                 partition_new,
-                                                                 operationdetail .get_last_child() 
.get_last_child(),
-                                                                 total_done,
-                                                                 true ) ;
-                                       
-                                       operationdetail .get_last_child() .get_last_child() 
-                                               .set_status( succes ? STATUS_SUCCES : STATUS_ERROR ) ;
-                                       if ( ! succes )
-                                       {
-                                               rollback_transaction( partition_old,
-                                                                     partition_new,
-                                                                     operationdetail .get_last_child(),
-                                                                     total_done ) ;
-
-                                               check_repair_filesystem( partition_old, operationdetail ) ;
-                                       }
+                                       rollback_transaction( partition_old,
+                                                             partition_new,
+                                                             operationdetail .get_last_child(),
+                                                             total_done );
+                                       check_repair_filesystem( partition_old, operationdetail );
                                }
                        }
                        else


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