mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix parsing error with no masterlist present
This commit is contained in:
@@ -46,10 +46,12 @@ void ApiDatabase::LoadLists(const std::string& masterlistPath,
|
||||
Masterlist temp;
|
||||
MetadataList userTemp;
|
||||
|
||||
if (boost::filesystem::exists(masterlistPath)) {
|
||||
temp.Load(masterlistPath);
|
||||
} else {
|
||||
throw FileAccessError("The given masterlist path does not exist: " + masterlistPath);
|
||||
if (!masterlistPath.empty()) {
|
||||
if (boost::filesystem::exists(masterlistPath)) {
|
||||
temp.Load(masterlistPath);
|
||||
} else {
|
||||
throw FileAccessError("The given masterlist path does not exist: " + masterlistPath);
|
||||
}
|
||||
}
|
||||
|
||||
if (!userlistPath.empty()) {
|
||||
@@ -95,7 +97,6 @@ void ApiDatabase::WriteUserMetadata(const std::string& outputFile, const bool ov
|
||||
// LOOT Functionality Functions
|
||||
////////////////////////////////////
|
||||
|
||||
|
||||
bool ApiDatabase::UpdateMasterlist(const std::string& masterlistPath,
|
||||
const std::string& remoteURL,
|
||||
const std::string& remoteBranch) {
|
||||
|
||||
Reference in New Issue
Block a user