[gparted] Remove now superfluous load_fs_info_cache() (#131)



commit e9d4a21bfb03d22559145532b6b39c48378d0aaa
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sun Jan 31 12:54:49 2021 +0000

    Remove now superfluous load_fs_info_cache() (#131)
    
    This method is now only called from one location in the code so put it's
    two lines of code there.
    
    Closes #131 - GParted hangs when non-named device is hung

 include/FS_Info.h |  1 -
 src/FS_Info.cc    | 10 ++--------
 2 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/include/FS_Info.h b/include/FS_Info.h
index 19c2e10f..b3fb315e 100644
--- a/include/FS_Info.h
+++ b/include/FS_Info.h
@@ -49,7 +49,6 @@ private:
        static bool not_initialised_then_error();
        static void set_commands_found();
        static const FS_Entry & get_cache_entry_by_path( const Glib::ustring & path );
-       static void load_fs_info_cache(const std::vector<Glib::ustring>& paths);
        static bool run_blkid_load_cache(const std::vector<Glib::ustring>& paths);
        static void update_fs_info_cache_all_labels();
        static bool run_blkid_update_cache_one_label( FS_Entry & fs_entry );
diff --git a/src/FS_Info.cc b/src/FS_Info.cc
index dbfba9a6..8e9b3625 100644
--- a/src/FS_Info.cc
+++ b/src/FS_Info.cc
@@ -54,7 +54,8 @@ std::vector<FS_Entry> FS_Info::fs_info_cache;
 void FS_Info::load_cache_for_paths(const std::vector<Glib::ustring>& paths)
 {
        set_commands_found();
-       load_fs_info_cache(paths);
+       fs_info_cache.clear();
+       run_blkid_load_cache(paths);
        fs_info_cache_initialized = true;
 }
 
@@ -206,13 +207,6 @@ const FS_Entry & FS_Info::get_cache_entry_by_path( const Glib::ustring & path )
 }
 
 
-void FS_Info::load_fs_info_cache(const std::vector<Glib::ustring>& paths)
-{
-       fs_info_cache.clear();
-       run_blkid_load_cache(paths);
-}
-
-
 bool FS_Info::run_blkid_load_cache(const std::vector<Glib::ustring>& paths)
 {
        // Parse blkid output line by line extracting mandatory field: path and optional


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]