- more ftp bugfixes
This commit is contained in:
parent
b84bede3df
commit
c8c77f75e3
|
@ -72,6 +72,9 @@ void FTPClientThread::getMapFromServer(string mapFileName) {
|
||||||
FTP_Client_ResultType result = ftp_crt_FAIL;
|
FTP_Client_ResultType result = ftp_crt_FAIL;
|
||||||
|
|
||||||
string destFile = this->mapsPath.second + mapFileName;
|
string destFile = this->mapsPath.second + mapFileName;
|
||||||
|
if(EndsWith(destFile,".mgm") && EndsWith(destFile,".gbm")) {
|
||||||
|
destFile += ".mgm";
|
||||||
|
}
|
||||||
|
|
||||||
struct FtpFile ftpfile = {
|
struct FtpFile ftpfile = {
|
||||||
destFile.c_str(), /* name to store the file as if succesful */
|
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 */
|
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();
|
//curl_global_cleanup();
|
||||||
|
|
||||||
if(this->pCBObject != NULL) {
|
if(this->pCBObject != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user