|
@@ -124,8 +124,13 @@ void UserIoMan::printDisconnect(Json::Value root) {
|
|
|
|
|
|
void UserIoMan::printPut(Json::Value root) {
|
|
|
if (!root["accept"].asBool()) {
|
|
|
- std::cout << "Upload request for file " << root["file"].asString()
|
|
|
- << " failed: " << root["error"].asString() << std::endl;
|
|
|
+ if (root.isMember("file")) {
|
|
|
+ std::cout << "Upload request for file " << root["file"].asString()
|
|
|
+ << " failed: " << root["error"].asString() << std::endl;
|
|
|
+ } else {
|
|
|
+ std::cout << "Upload request failed: " << root["error"].asString()
|
|
|
+ << std::endl;
|
|
|
+ }
|
|
|
} else
|
|
|
std::cout << "Begin uploading file " << root["file"].asString()
|
|
|
<< std::endl;
|
|
@@ -133,8 +138,13 @@ void UserIoMan::printPut(Json::Value root) {
|
|
|
|
|
|
void UserIoMan::printGet(Json::Value root) {
|
|
|
if (!root["accept"].asBool()) {
|
|
|
- std::cout << "Download request for file " << root["file"].asString()
|
|
|
- << " failed: " << root["error"].asString() << std::endl;
|
|
|
+ if (root.isMember("file")) {
|
|
|
+ std::cout << "Download request for file " << root["file"].asString()
|
|
|
+ << " failed: " << root["error"].asString() << std::endl;
|
|
|
+ } else {
|
|
|
+ std::cout << "Download request failed: " << root["error"].asString()
|
|
|
+ << std::endl;
|
|
|
+ }
|
|
|
} else
|
|
|
std::cout << "Begin downloading file " << root["file"].asString()
|
|
|
<< std::endl;
|