[gparted/psusi/refactor: 13/19] Check fs after reverting partition table



commit 9144d04f083fd85cd613b8763e0c12d619172d7c
Author: Phillip Susi <psusi ubuntu com>
Date:   Sat Jan 26 23:25:21 2013 -0500

    Check fs after reverting partition table
    
    After a failed or canceled move, the move was reverted, and the filesystem
    was fscked while the partition was still in the expanded state encompassing
    the original and destination partitions, resulting in errors and
    corruption.  Move fsck to after the partition table has been restored to
    its original state.

 src/GParted_Core.cc |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 05a3a34..031219d 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -2086,8 +2086,12 @@ bool GParted_Core::move( const Device & device,
 
 				Partition partition_restore = partition_old ;
 				partition_restore .alignment = ALIGN_STRICT ;  //Ensure that old partition boundaries are not modified
-				if ( resize_move_partition( partition_all_space, partition_restore, operationdetail .get_last_child() ) )
-					operationdetail .get_last_child() .set_status( STATUS_SUCCES ) ;
+				if ( resize_move_partition(
+					     partition_all_space, partition_restore, operationdetail.get_last_child() ) ) {
+					operationdetail.get_last_child().set_status( STATUS_SUCCES );
+					check_repair_filesystem( partition_old, operationdetail );
+				}
+
 				else
 					operationdetail .get_last_child() .set_status( STATUS_ERROR ) ;
 			}
@@ -2160,7 +2164,6 @@ bool GParted_Core::move_filesystem( const Partition & 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]