[libcalamares] Make keys case-insensitive (as documented)

This commit is contained in:
Adriaan de Groot 2021-02-08 14:47:55 +01:00
parent 48541629f9
commit 9665af0e5a

View File

@ -25,9 +25,10 @@ CalamaresUtils::Partition::isFilesystemUsedGS( const Calamares::GlobalStorage* g
return false;
}
const QVariantMap fsUse = gs->value( fsUse_key ).toMap();
if ( fsUse.contains( filesystemType ) )
QString key = filesystemType.toLower();
if ( fsUse.contains( key ) )
{
const auto v = fsUse.value( filesystemType );
const auto v = fsUse.value( key );
return v.toBool();
}
return false;
@ -39,7 +40,8 @@ CalamaresUtils::Partition::useFilesystemGS( Calamares::GlobalStorage* gs, const
if ( gs )
{
QVariantMap existingMap = gs->contains( fsUse_key ) ? gs->value( fsUse_key ).toMap() : QVariantMap();
existingMap.insert( filesystemType, used );
QString key = filesystemType.toLower();
existingMap.insert( key, used );
gs->insert( fsUse_key, existingMap );
}
}