X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=octopi%2Flibrary%2Ftentacles%2Frecursive_file_copy.cpp;fp=octopi%2Flibrary%2Ftentacles%2Frecursive_file_copy.cpp;h=0b33269f73f858fadb768b12fe6a87ea366fc43f;hb=ab871f11081cec310c2e51a7d3b7ca148b1a99f6;hp=a159c41c0622493b3f82db6c3ea847372771b8c0;hpb=625428deeff1532552592380f05d426bc2f1d018;p=feisty_meow.git diff --git a/octopi/library/tentacles/recursive_file_copy.cpp b/octopi/library/tentacles/recursive_file_copy.cpp index a159c41c..0b33269f 100644 --- a/octopi/library/tentacles/recursive_file_copy.cpp +++ b/octopi/library/tentacles/recursive_file_copy.cpp @@ -165,6 +165,12 @@ outcome recursive_file_copy::copy_hierarchy(int transfer_mode, if (!reply) RETURN_ERROR_RFC("failed to get ongoing transfer reply", NONE_READY); + if (reply->_command == file_transfer_infoton::CONCLUDE_TRANSFER_MARKER) { + BASE_LOG(astring("finished transfer from \"") + source_dir + + "\" to \"" + target_dir + "\""); + break; + } + byte_array copy = reply->_packed_data; while (copy.length()) { file_time empty; @@ -178,18 +184,11 @@ outcome recursive_file_copy::copy_hierarchy(int transfer_mode, //hmmm: this needs better formatting, and should not repeat the same file name even // if it's in multiple chunks. -//hmmm: if logging, then... BASE_LOG(head.readable_text_form()); } if (copy.length()) RETURN_ERROR_RFC("still had data in array", GARBAGE); - if (reply->_command == file_transfer_infoton::CONCLUDE_TRANSFER_MARKER) { - BASE_LOG(astring("finished transfer from \"") + source_dir - + "\" to \"" + target_dir + "\""); - break; - } - octopus_request_id resp_id(ent, iter + 11); outcome resp_ret = client_spider.evaluate(reply, resp_id); if (resp_ret != tentacle::OKAY)