diff --git a/ChangeLog b/ChangeLog index c54de218..ed90f536 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-12-17 Bart Hakvoort + + * src/GParted_Core.cc: Only peform partable re-read check if at least one partition on a device is mounted. + 2004-12-15 Bart Hakvoort * some minor internal codechanges, which should save a few bytes of mem here and there. diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index 284bae0d..f74111dc 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -80,7 +80,6 @@ void GParted_Core::get_devices( std::vector & devices, bool deep_scan ) break ; } - device = ped_device_get_next( device ) ; } close_device_and_disk( device, disk ) ; @@ -88,7 +87,6 @@ void GParted_Core::get_devices( std::vector & devices, bool deep_scan ) //and sort the devices by name.. (this prevents some very weird errors ;) ) sort( device_paths .begin( ), device_paths .end( ) ) ; - for ( unsigned int t = 0 ; t < device_paths .size( ) ; t++ ) { if ( open_device_and_disk( device_paths[ t ], device, disk, false ) ) @@ -110,13 +108,13 @@ void GParted_Core::get_devices( std::vector & devices, bool deep_scan ) temp_device .disktype = disk ->type ->name ; temp_device .max_prims = ped_disk_get_max_primary_partition_count( disk ) ; - if ( deep_scan ) + set_device_partitions( temp_device, deep_scan ) ; + + if ( deep_scan && temp_device .busy ) { temp_device .readonly = ! ped_disk_commit_to_os( disk ) ; sleep( 1 ) ;//this sucks, but it seems that after the commit test, the paths are removed and added again (which takes time..) } - - set_device_partitions( temp_device, deep_scan ) ; } //harddisk without disklabel else