Use default library.xml when an invalid one is present

A size zero library.xml provokes search paths are
not saved, lets use the default one like we do
when library.xml is not present.
This weir config is likely a residue of some older
test version, so it may not affect all users, but
still this change is a safe failout mechanism.
This commit is contained in:
Alejandro Martinez
2025-01-15 11:55:50 -03:00
parent f7e91e7fae
commit bf843459c7

View File

@@ -78,8 +78,11 @@ Library::initialise(QDir home)
xmlReader.parse(source);
libraries = handler.getLibraries();
} else {
}
if (libraries.count() == 0) {
// if we still don't have libraries, create a default one
Library *one = new Library;
one->name = "Media Library";
QString spath = appsettings->value(NULL, GC_WORKOUTDIR).toString();