|
@@ -66,10 +66,10 @@ JsonCommander::executeClose(const Json::Value &message) {
|
|
|
|
|
|
JsonCommander::Response JsonCommander::executeList(const Json::Value &message) {
|
|
JsonCommander::Response JsonCommander::executeList(const Json::Value &message) {
|
|
JsonCommander::Response response;
|
|
JsonCommander::Response response;
|
|
|
|
+ response.action = send;
|
|
response.json["command"] = "list";
|
|
response.json["command"] = "list";
|
|
|
|
|
|
if(fileManager.isUploading()) {
|
|
if(fileManager.isUploading()) {
|
|
- response.action = send;
|
|
|
|
response.json["accept"] = false;
|
|
response.json["accept"] = false;
|
|
response.json["error"] = "there is an upload already running";
|
|
response.json["error"] = "there is an upload already running";
|
|
} else {
|
|
} else {
|
|
@@ -94,7 +94,7 @@ JsonCommander::Response JsonCommander::executeListData(const Json::Value &messag
|
|
std::vector<std::string> v = fileManager.getNextChunkFromList();
|
|
std::vector<std::string> v = fileManager.getNextChunkFromList();
|
|
for(int i=0; i<v.size(); i++)
|
|
for(int i=0; i<v.size(); i++)
|
|
array.append(v.at(i));
|
|
array.append(v.at(i));
|
|
- // response.json["remaining"] = message["chunk"].asInt();
|
|
|
|
|
|
+ response.json["remaining"] = message["chunk"].asInt()-1;
|
|
response.json["cancel"] = false;
|
|
response.json["cancel"] = false;
|
|
response.json["names"] = array;
|
|
response.json["names"] = array;
|
|
response.json["error"] = "";
|
|
response.json["error"] = "";
|