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.
This commit is contained in:
Phillip Susi 2013-01-26 23:25:21 -05:00 committed by Curtis Gedak
parent b9b4b2e55d
commit d62bf0a0f3
1 changed files with 6 additions and 3 deletions

View File

@ -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