[gparted] Fix minimum size calculation when pasting a copied partition



commit bec2a6f176076db733d786302d62ca302f9161e2
Author: Curtis Gedak <gedakc gmail com>
Date:   Tue May 4 15:00:39 2010 -0600

    Fix minimum size calculation when pasting a copied partition
    
    This change is in preparation for supporting sectors sizes > 512 bytes.

 src/Dialog_Partition_Copy.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Dialog_Partition_Copy.cc b/src/Dialog_Partition_Copy.cc
index 17bce0c..34cf274 100644
--- a/src/Dialog_Partition_Copy.cc
+++ b/src/Dialog_Partition_Copy.cc
@@ -48,7 +48,7 @@ void Dialog_Partition_Copy::Set_Data( const Partition & selected_partition, cons
 	//  handle situation where src sector size is smaller than dst sector size and an additional partial dst sector is required.
 	Sector copied_min_sectors = ( copied_partition .get_byte_length() + (selected_partition .sector_size - 1) ) / selected_partition .sector_size ;
 
-	long COPIED_LENGTH_MB = Utils::round( Utils::sector_to_unit( copied_min_sectors, copied_partition .sector_size, UNIT_MIB ) ) ; 
+	long COPIED_LENGTH_MB = Utils::round( Utils::sector_to_unit( copied_min_sectors, selected_partition .sector_size, UNIT_MIB ) ) ; 
 	//  /* Copy Primary not at start of disk to within Extended partition */
 	//  Adjust when a primary partition is copied and pasted
 	//  into an unallocated space in an extended partition



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