for(; aFileIter.More(); aFileIter.Next()) {
string aURL = aFileIter.URL();
string aFileName = aURL.substr(aURL.find_last_of("/\\")+1);
+ int startUnderlineIndex = aFileName.find_first_of("_") + 1;
+ string aSourceFileName = aFileName.substr(startUnderlineIndex, aFileName.find_last_of(".") - startUnderlineIndex);
//cout << "aURL = " << "http://" << aSimanWSHost << "/repository/" << aURL << "\n";
string aPathToVault = aResponseFilePath.substr(0, aResponseFilePath.find("download")) + "vault/";
aGetFileRequest->setArgs0(aPathToVault + aURL);
aGetFileResponse = aStub->getFile(aGetFileRequest);
- outputStream.open((aClientFileDir + aFileName).c_str(), ofstream::binary);
+ outputStream.open((aClientFileDir + aSourceFileName).c_str(), ofstream::binary);
int aBufferSize = axutil_base64_binary_get_decoded_binary_len(aGetFileResponse->get_return(), Environment::getEnv());
int* aBufSize = new int[aBufferSize];
unsigned char* aCopyBuffer = axutil_base64_binary_get_plain_binary(aGetFileResponse->get_return(), Environment::getEnv(), aBufSize);