Ensure original partition boundaries kept on rollback of failed move

This commit is contained in:
Curtis Gedak 2010-07-22 17:17:16 -06:00
parent c3a06ffd6c
commit a3d70a1fbf
1 changed files with 3 additions and 1 deletions

View File

@ -1745,7 +1745,9 @@ bool GParted_Core::move( const Device & device,
{
operationdetail .add_child( OperationDetail( _("rollback last change to the partition table") ) ) ;
if ( resize_move_partition( partition_all_space, partition_old, operationdetail .get_last_child() ) )
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 ) ;
else
operationdetail .get_last_child() .set_status( STATUS_ERROR ) ;