added Error msg on failed curl call

pull/23/head
JuanJakobo 2021-02-15 21:53:15 +01:00
parent 8c0a1d3218
commit bfa3ad9751
1 changed files with 14 additions and 8 deletions

View File

@ -191,6 +191,10 @@ void Nextcloud::downloadItem(vector<Item> &tempItems, int itemID)
break;
}
}
else
{
Message(ICON_ERROR, "Error", ("An curl error occured (Error Code: " + Util::valueToString(res) + ").").c_str(), 4000);
}
}
}
@ -268,7 +272,6 @@ vector<Item> Nextcloud::getDataStructure(const string &pathUrl, const string &Us
Log::writeLog("Starting download of DataStructure");
string readBuffer;
CURLcode res;
CURL *curl = curl_easy_init();
@ -351,6 +354,10 @@ vector<Item> Nextcloud::getDataStructure(const string &pathUrl, const string &Us
return getOfflineStructure(pathUrl);
}
}
else
{
Message(ICON_ERROR, "Error", ("An curl error occured (Error Code: " + Util::valueToString(res) + ").").c_str(), 4000);
}
}
return {};
}
@ -413,7 +420,6 @@ vector<Item> Nextcloud::readInXML(string xml)
}
return tempItems;
}
string Nextcloud::getLocalPath(string path)