Also prompt for LUKS password as required for check operation (#59)

A check operation involves (1) checking the file system, (2) growing the
encryption volume and (3) growing the file system.  Therefore prompt for
the LUKS passphrase as required when composing a check operation too.

Closes #59 - Resize of LUKS2 encrypted file system fails with "Nothing
             to read on input"
This commit is contained in:
Mike Fleetwood 2021-04-07 16:08:22 +01:00 committed by Curtis Gedak
parent f3aec1f4b1
commit 80624bfd40
1 changed files with 7 additions and 1 deletions

View File

@ -3238,12 +3238,18 @@ void Win_GParted::activate_manage_flags()
if ( dialog .any_change )
menu_gparted_refresh_devices() ;
}
void Win_GParted::activate_check()
{
g_assert( selected_partition_ptr != NULL ); // Bug: Partition callback without a selected partition
g_assert( valid_display_partition_ptr( selected_partition_ptr ) ); // Bug: Not pointing at a valid display partition object
if (! ask_for_password_for_encrypted_resize_as_required(*selected_partition_ptr))
// Open encryption mapping needing a passphrase to resize but the password
// dialog was cancelled or closed without providing a working passphrase.
return;
// FIXME: Consider constructing new partition object with zero unallocated and
// messages cleared to represent how applying a check operation also grows the
// file system to fill the partition.