From 9665af0e5a19fd863663d0a4ad84c64e296dba81 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 8 Feb 2021 14:47:55 +0100 Subject: [PATCH] [libcalamares] Make keys case-insensitive (as documented) --- src/libcalamares/partition/Global.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libcalamares/partition/Global.cpp b/src/libcalamares/partition/Global.cpp index 3071cd081..fbe775f11 100644 --- a/src/libcalamares/partition/Global.cpp +++ b/src/libcalamares/partition/Global.cpp @@ -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 ); } }