Added exclusion to the partition copy primary paste unallocated extended problem because primary partitions at the start of the disk do not experience this problem.

svn path=/trunk/; revision=954
This commit is contained in:
Curtis Gedak 2008-11-05 20:18:52 +00:00
parent 17292ad83b
commit 409f46b1d0
2 changed files with 9 additions and 2 deletions

View File

@ -2,8 +2,11 @@
* src/Dialog_Partition_Copy.cc: Fixed copy and paste partition problem.
- Adjust for situation when an MSDOS partition table is in
use and a primary partition is copied and pasted into
use and a primary partition is copied and pasted into
an unallocated space in an extended partition.
- Added exclusion for primary partitions at the start of the disk
since this problem does not occur because the size of the master
boot record equals the size of the extended boot record.
- Closes GParted bug #556058
2008-11-04 Curtis Gedak <gedakc@gmail.com>

View File

@ -54,8 +54,12 @@ void Dialog_Partition_Copy::Set_Data( const Partition & selected_partition, cons
// additional 8 MB. 8 MB is typical cylinder size with
// todays larger disks.
// 8 MB = (255 heads) * (63 sectors) * (512 bytes)
//FIXME: Should confirm MSDOS partition table type, and use cylinder size from device
// NOTE: This problem does not occur for a primary partition
// at the the start of the disk because the size of the EBR and
// Master Boot Record are the same.
//FIXME: Should confirm MSDOS partition table type, track sector size, and use cylinder size from device
if ( copied_partition .type == TYPE_PRIMARY
&& copied_partition .sector_start != 63
&& selected_partition .type == TYPE_UNALLOCATED
&& selected_partition .inside_extended
)