[gparted/psusi/refactor: 12/16] Check fs after reverting partition table



commit ab4519c62134db1424c4462f85fe2a162f39b1b3
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 078cee3..75131d6 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -2085,8 +2085,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 ) ;
 			}
@@ -2159,7 +2163,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]