diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc index acf732b4..dcd83919 100644 --- a/src/Dialog_Partition_New.cc +++ b/src/Dialog_Partition_New.cc @@ -345,9 +345,12 @@ void Dialog_Partition_New::Build_Filesystems_Menu( bool only_unformatted ) menu_filesystem .items() .back() .set_sensitive( ! only_unformatted && FILESYSTEMS[ t ] .create && this ->selected_partition .get_byte_length() >= FILESYSTEMS[ t ] .MIN ) ; - //use ext2 as default filesystem - if ( Utils::get_filesystem_string( FILESYSTEMS[ t ] .filesystem ) == "ext2" && - menu_filesystem .items() .back() .sensitive() ) + //use ext4/3/2 as first/second/third choice default file system + //(Depends on ordering in FILESYSTEMS for preference) + if ( ( FILESYSTEMS[ t ] .filesystem == FS_EXT2 || + FILESYSTEMS[ t ] .filesystem == FS_EXT3 || + FILESYSTEMS[ t ] .filesystem == FS_EXT4 ) && + menu_filesystem .items() .back() .sensitive() ) { first_creatable_fs=menu_filesystem .items() .size() - 1; set_first=true; @@ -359,7 +362,7 @@ void Dialog_Partition_New::Build_Filesystems_Menu( bool only_unformatted ) if(!set_first) { - //find and set first enabled file system + //find and set first enabled file system as last choice default for ( unsigned int t = 0 ; t < menu_filesystem .items() .size() ; t++ ) if ( menu_filesystem .items()[ t ] .sensitive() ) {