mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +02:00
- more ftp tileset bugfixes
This commit is contained in:
@@ -251,6 +251,9 @@ FTP_Client_ResultType FTPClientThread::getTilesetFromServer(string tileSetName,
|
|||||||
destFile += "/";
|
destFile += "/";
|
||||||
}
|
}
|
||||||
destFile += tileSetName;
|
destFile += tileSetName;
|
||||||
|
if(EndsWith(destFile,"/") == false && EndsWith(destFile,"\\") == false) {
|
||||||
|
destFile += "/";
|
||||||
|
}
|
||||||
|
|
||||||
if(tileSetNameSubfolder != "") {
|
if(tileSetNameSubfolder != "") {
|
||||||
destFile += tileSetNameSubfolder;
|
destFile += tileSetNameSubfolder;
|
||||||
@@ -275,7 +278,12 @@ FTP_Client_ResultType FTPClientThread::getTilesetFromServer(string tileSetName,
|
|||||||
ftpfile.stream = NULL;
|
ftpfile.stream = NULL;
|
||||||
|
|
||||||
char szBuf[1024]="";
|
char szBuf[1024]="";
|
||||||
sprintf(szBuf,"ftp://%s:%s@%s:%d/%s*",ftpUser.c_str(),ftpUserPassword.c_str(),serverUrl.c_str(),portNumber,tileSetName.c_str());
|
if(tileSetNameSubfolder == "") {
|
||||||
|
sprintf(szBuf,"ftp://%s:%s@%s:%d/%s/*",ftpUser.c_str(),ftpUserPassword.c_str(),serverUrl.c_str(),portNumber,tileSetName.c_str());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sprintf(szBuf,"ftp://%s:%s@%s:%d/%s/%s/*",ftpUser.c_str(),ftpUserPassword.c_str(),serverUrl.c_str(),portNumber,tileSetName.c_str(),tileSetNameSubfolder.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL,szBuf);
|
curl_easy_setopt(curl, CURLOPT_URL,szBuf);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user