diff --git a/include/Dialog_Rescue_Data.h b/include/Dialog_Rescue_Data.h index 0dd12452..0b3e54c6 100644 --- a/include/Dialog_Rescue_Data.h +++ b/include/Dialog_Rescue_Data.h @@ -39,7 +39,7 @@ public: void init_partitions(Device *parentDevice, const Glib::ustring &buff); - std::vector get_partitions(); + bool found_partitions(); private: void draw_dialog(); diff --git a/src/Dialog_Rescue_Data.cc b/src/Dialog_Rescue_Data.cc index 956fe958..0b0e3463 100644 --- a/src/Dialog_Rescue_Data.cc +++ b/src/Dialog_Rescue_Data.cc @@ -38,9 +38,9 @@ Dialog_Rescue_Data::Dialog_Rescue_Data() } //getters -std::vector Dialog_Rescue_Data::get_partitions() +bool Dialog_Rescue_Data::found_partitions() { - return this->partitions; + return this->partitions.size() > 0; } // Draws the dialog diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index f001e619..8e8e801a 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -2551,7 +2551,7 @@ void Win_GParted::activate_attempt_rescue_data() //Reads the output of gpart dialog.init_partitions(&devices[ current_device ], this->gpart_output); - if(dialog.get_partitions().size()==0) //No partitions found + if ( ! dialog.found_partitions() ) { //Dialog information Gtk::MessageDialog errorDialog(*this, "", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);