[gparted] Ensure original partition boundaries kept on rollback of failed move



commit a3d70a1fbfbf07aeba9d33049cf6824569e75a8b
Author: Curtis Gedak <gedakc gmail com>
Date:   Thu Jul 22 17:17:16 2010 -0600

    Ensure original partition boundaries kept on rollback of failed move

 src/GParted_Core.cc |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 3009b6f..dda57a5 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -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 ) ;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]