mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 09:55:37 -04:00
Configs: empty config files are ok.
The default umount.conf contains no keys -- so it isn't a map, but it is a valid config file. Avoid the warning by accepting empty files. FIX 707
This commit is contained in:
parent
7e87e3ccb5
commit
367fe716b3
1 changed files with 6 additions and 0 deletions
|
@ -176,6 +176,12 @@ Module::loadConfigurationFile( const QString& configFileName ) //throws YAML::Ex
|
|||
QByteArray ba = configFile.readAll();
|
||||
|
||||
YAML::Node doc = YAML::Load( ba.constData() );
|
||||
if ( doc.IsNull() )
|
||||
{
|
||||
// Special case: empty config files are valid,
|
||||
// but aren't a map.
|
||||
return;
|
||||
}
|
||||
if ( !doc.IsMap() )
|
||||
{
|
||||
cLog() << Q_FUNC_INFO << "bad module configuration format"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue