- make app update work in windows
This commit is contained in:
parent
f76fe55153
commit
51c67cc7ff
|
@ -4439,6 +4439,10 @@ int glestMain(int argc, char** argv) {
|
|||
}
|
||||
createDirectoryPaths(tempDataPath);
|
||||
|
||||
string binaryNameOld = Properties::getApplicationPath() + extractFileFromDirectoryPath(PlatformExceptionHandler::application_binary) + "__REMOVE";
|
||||
if(fileExists(binaryNameOld)) {
|
||||
removeFile(binaryNameOld);
|
||||
}
|
||||
|
||||
if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_USE_PORTS]) == true) {
|
||||
int foundParamIndIndex = -1;
|
||||
|
|
|
@ -460,7 +460,7 @@ void MenuStateRoot::FTPClient_CallbackEvent(string itemName,
|
|||
resultRename = renameFile(binaryNameOld, binaryName);
|
||||
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Rename: [%s] to [%s] result = %d\n",binaryName.c_str(),binaryNameOld.c_str(),resultRename);
|
||||
printf("#2 Rename: [%s] to [%s] result = %d errno = %d\n",binaryName.c_str(),binaryNameOld.c_str(),resultRename, errno);
|
||||
printf("#2 Rename: [%s] to [%s] result = %d errno = %d\n",binaryNameOld.c_str(),binaryName.c_str(),resultRename, errno);
|
||||
}
|
||||
|
||||
console.addLine("Successfully updated, please restart!",true);
|
||||
|
|
Loading…
Reference in New Issue