[gparted] Check fs after reverting partition table
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Check fs after reverting partition table
- Date: Tue, 12 Mar 2013 00:48:37 +0000 (UTC)
commit d62bf0a0f324d206339a7bae3c7736446109ac32
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 b10ad1f..6d4d280 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -2092,8 +2092,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 ) ;
}
@@ -2166,7 +2170,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]