From c8c77f75e326c17fb4b0ca3e3c763d28441b8db3 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 29 Dec 2010 06:55:47 +0000 Subject: [PATCH] - more ftp bugfixes --- .../shared_lib/sources/platform/posix/miniftpclient.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/shared_lib/sources/platform/posix/miniftpclient.cpp b/source/shared_lib/sources/platform/posix/miniftpclient.cpp index 83b81f00..5ef116d3 100644 --- a/source/shared_lib/sources/platform/posix/miniftpclient.cpp +++ b/source/shared_lib/sources/platform/posix/miniftpclient.cpp @@ -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) {