fixed an issue with copying to unallocated space. It works fine now, but

* src/GParted_Core.cc: fixed an issue with copying to unallocated
  space. It works fine now, but this entire copy operation breaks
  consistency a bit. I should take a look at that when i have some
  more time.
This commit is contained in:
Bart Hakvoort 2006-09-03 18:01:55 +00:00
parent 0aa49f3e98
commit e0c354880a
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2006-09-03 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/GParted_Core.cc: fixed an issue with copying to unallocated
space. It works fine now, but this entire copy operation breaks
consistency a bit. I should take a look at that when i have some
more time.
2006-09-03 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/GParted_Core.cc: added progressfeedback to Delete()

View File

@ -310,11 +310,12 @@ bool GParted_Core::apply_operation_to_disk( Operation * operation )
succes = format( operation ->partition_new, operation ->operation_detail ) ;
break ;
case OPERATION_COPY:
//FIXME: think a bit about the process of copying, right now it's always a bit different from the rest...
//maybe we should change the function of partition_new and partition_original?
succes = calibrate_partition( operation ->partition_new, operation ->operation_detail ) &&
succes = ( operation ->partition_original .type == TYPE_UNALLOCATED ||
calibrate_partition( operation ->partition_new, operation ->operation_detail ) ) &&
calibrate_partition( static_cast<OperationCopy*>( operation ) ->partition_copied,
operation ->operation_detail ) &&
copy( static_cast<OperationCopy*>( operation ) ->partition_copied,
operation ->partition_new,
static_cast<OperationCopy*>( operation ) ->partition_copied .get_length(),
@ -971,8 +972,7 @@ bool GParted_Core::create_partition( Partition & new_partition, OperationDetail
close_device_and_disk() ;
}
//FIXME: if we create an extended partition and want to do some other operation right after it, it may fail...
//there is no extended path to wait for, but maybe we could wait for the device_path to appear? (i think the same goes for
//resize/move)
//(i think the same goes for resize/move) --- i REALLY need to fix this, see also #352744
if ( new_partition .partition_number > 0 &&
erase_filesystem_signatures( new_partition ) &&
( new_partition .type == GParted::TYPE_EXTENDED || wait_for_node( new_partition .get_path() ) ) )