diff --git a/ChangeLog b/ChangeLog index 433b97b3..3ea81878 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-03-26 Bart Hakvoort + + * src/GParted_Core.cc: made some small adjustments to devicechecks. + 2006-03-26 Bart Hakvoort * src/GParted_Core.cc: sort devices alphabetically by default. diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index ed1f2c00..392b4016 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -108,13 +108,7 @@ void GParted_Core::set_user_devices( const std::vector & user_dev bool GParted_Core::check_device_path( const Glib::ustring & device_path ) { - if ( device_path .length() > 6 && device_path .is_ascii() && open_device( device_path ) ) - { - close_device_and_disk() ; - return true ; - } - - return false ; + return ( device_path .length() > 6 && device_path .is_ascii() ) ; } void GParted_Core::get_devices( std::vector & devices ) @@ -146,7 +140,9 @@ void GParted_Core::get_devices( std::vector & devices ) for ( unsigned int t = 0 ; t < device_paths .size() ; t++ ) { - if ( check_device_path( device_paths[ t ] ) && open_device_and_disk( device_paths[ t ], false ) ) + if ( check_device_path( device_paths[ t ] ) && + open_device_and_disk( device_paths[ t ], false ) && + lp_device ) { temp_device .Reset() ;