Consolidate common if have ntfsresize command conditions

This commit is contained in:
Mike Fleetwood 2019-04-14 11:50:30 +01:00 committed by Curtis Gedak
parent ef4d4cb100
commit d795cccb1b
1 changed files with 4 additions and 7 deletions

View File

@ -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)