[gparted/psusi/refactor: 13/19] Check fs after reverting partition table
- From: Phillip Susi <psusi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted/psusi/refactor: 13/19] Check fs after reverting partition table
- Date: Fri, 22 Feb 2013 01:53:40 +0000 (UTC)
commit 4c4f74c03f743dbe05c2d27c71013c09d763fa9d
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 b798e76..2c319a2 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]