[gparted] Consolidate common if have ntfsresize command conditions



commit d795cccb1bd2fb91cf3aa80589507d753daf7883
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sun Apr 14 11:50:30 2019 +0100

    Consolidate common if have ntfsresize command conditions

 src/ntfs.cc | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/ntfs.cc b/src/ntfs.cc
index f93172c3..7f4247db 100644
--- a/src/ntfs.cc
+++ b/src/ntfs.cc
@@ -65,9 +65,6 @@ FS ntfs::get_filesystem_support()
        if (! Glib::find_program_in_path("ntfsinfo").empty())
                fs.read = FS::EXTERNAL;
 
-       if (! Glib::find_program_in_path("ntfsresize").empty())
-               fs.check = FS::EXTERNAL;
-
        if ( ! Glib::find_program_in_path( "ntfslabel" ) .empty() ) {
                Glib::ustring version ;
 
@@ -93,20 +90,20 @@ FS ntfs::get_filesystem_support()
        }
 
        //resizing is a delicate process ...
-       if (fs.check)
+       if (! Glib::find_program_in_path("ntfsresize").empty())
        {
+               fs.check = FS::EXTERNAL;
                fs.grow = FS::EXTERNAL;
 
                if ( fs .read ) //needed to determine a min file system size..
                        fs.shrink = FS::EXTERNAL;
+
+               fs.move = FS::GPARTED;
        }
 
        if ( ! Glib::find_program_in_path( "ntfsclone" ) .empty() )
                fs.copy = FS::EXTERNAL;
 
-       if ( fs .check )
-               fs.move = FS::GPARTED;
-
        fs .online_read = FS::GPARTED ;
 
        //Minimum NTFS partition size = (Minimum NTFS volume size) + (backup NTFS boot sector)


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