[partition] Make replace partition call setDefaultFsType() so the FS is updated

This commit is contained in:
dalto 2023-02-18 09:43:03 -06:00
parent 8080adbce2
commit a1c9dedc37

View File

@ -217,6 +217,12 @@ doReplacePartition( PartitionCoreModule* core, Device* dev, Partition* partition
cDebug() << "doReplacePartition for device" << partition->partitionPath();
// Looking up the defaultFsType (which should name a filesystem type)
// will log an error and set the type to Unknown if there's something wrong.
FileSystem::Type type = FileSystem::Unknown;
PartUtils::canonicalFilesystemName( o.defaultFsType, &type );
core->partitionLayout().setDefaultFsType( type == FileSystem::Unknown ? FileSystem::Ext4 : type );
PartitionRole newRoles( partition->roles() );
if ( partition->roles().has( PartitionRole::Extended ) )
{