- more ftp bugfixes

This commit is contained in:
Mark Vejvoda 2010-12-29 06:55:47 +00:00
parent b84bede3df
commit c8c77f75e3
1 changed files with 8 additions and 0 deletions

View File

@ -72,6 +72,9 @@ void FTPClientThread::getMapFromServer(string mapFileName) {
FTP_Client_ResultType result = ftp_crt_FAIL;
string destFile = this->mapsPath.second + mapFileName;
if(EndsWith(destFile,".mgm") && EndsWith(destFile,".gbm")) {
destFile += ".mgm";
}
struct FtpFile ftpfile = {
destFile.c_str(), /* name to store the file as if succesful */
@ -142,6 +145,11 @@ void FTPClientThread::getMapFromServer(string mapFileName) {
fclose(ftpfile.stream); /* close the local file */
}
if(result != ftp_crt_SUCCESS && EndsWith(destFile,".mgm")) {
destFile = this->mapsPath.second + mapFileName + ".gbm";
getMapFromServer(destFile);
}
//curl_global_cleanup();
if(this->pCBObject != NULL) {