Fix cannot format error dialog which always reported the file system as encrypted

Try to format an existing partition with a file system which doesn't
fit.  The error dialog reporting the partition as too small or too large
always claimed the file system was encrypted, whether it was or not.
For example trying to format a 128 MiB partition as btrfs produces this
error dialog:

    (-) Cannot format this file system to [Encrypted] btrfs
        A [Encrypted] btrfs file system requires
        a partition of at least 256.00 MiB.
                                                   [  OK  ]

This commit:
    88136c96d7
    Extend functions generating encrypted file system string (#774818)
just completely missed handling the case for non-encrypted file systems
in Utils::get_filesystem_string().  Add the missed code.
This commit is contained in:
Mike Fleetwood 2018-01-17 12:22:00 +00:00 committed by Curtis Gedak
parent 46bf5a383e
commit 32c483c314
1 changed files with 4 additions and 1 deletions

View File

@ -316,7 +316,10 @@ const Glib::ustring Utils::get_encrypted_string()
const Glib::ustring Utils::get_filesystem_string( bool encrypted, FILESYSTEM fstype )
{
return get_encrypted_string() + " " + get_filesystem_string( fstype );
if ( encrypted )
return get_encrypted_string() + " " + get_filesystem_string( fstype );
else
return get_filesystem_string( fstype );
}
// Return Linux kernel name only for mountable file systems.