mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 19:52:25 +01:00
- more updates for updating version on windows
This commit is contained in:
parent
d13118ecf8
commit
f76fe55153
@ -19,6 +19,7 @@
|
||||
#include "platform_util.h"
|
||||
#include "conversion.h"
|
||||
#include "cache_manager.h"
|
||||
#include "errno.h"
|
||||
#include "leak_dumper.h"
|
||||
|
||||
using namespace Shared::Util;
|
||||
@ -394,6 +395,8 @@ bool upgradeFilesInTemp() {
|
||||
string newFileName = Properties::getApplicationPath() + extractFileFromDirectoryPath(fileName);
|
||||
bool result = renameFile(fileName,newFileName);
|
||||
if(result == false) {
|
||||
printf("FAILED Rename: [%s] to [%s] result = %d errno = %d\n",fileName.c_str(),newFileName.c_str(),result,errno);
|
||||
|
||||
anyFailures = true;
|
||||
}
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Rename: [%s] to [%s] result = %d\n",fileName.c_str(),newFileName.c_str(),result);
|
||||
|
@ -423,7 +423,7 @@ void MenuStateRoot::FTPClient_CallbackEvent(string itemName,
|
||||
fileFTPProgressList.erase(itemName);
|
||||
safeMutexFTPProgress.ReleaseLock();
|
||||
|
||||
printf("### downloaded TEMP file [%s] result = %d\n",itemName.c_str(),result.first);
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("### downloaded TEMP file [%s] result = %d\n",itemName.c_str(),result.first);
|
||||
|
||||
if(result.first == ftp_crt_SUCCESS) {
|
||||
// Get path to temp files
|
||||
@ -452,11 +452,15 @@ void MenuStateRoot::FTPClient_CallbackEvent(string itemName,
|
||||
string binaryNameOld = Properties::getApplicationPath() + extractFileFromDirectoryPath(PlatformExceptionHandler::application_binary) + "__REMOVE";
|
||||
bool resultRename = renameFile(binaryName,binaryNameOld);
|
||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Rename: [%s] to [%s] result = %d\n",binaryName.c_str(),binaryNameOld.c_str(),resultRename);
|
||||
printf("#1 Rename: [%s] to [%s] result = %d\n",binaryName.c_str(),binaryNameOld.c_str(),resultRename);
|
||||
printf("#1 Rename: [%s] to [%s] result = %d errno = %d\n",binaryName.c_str(),binaryNameOld.c_str(),resultRename, errno);
|
||||
|
||||
//result = upgradeFilesInTemp();
|
||||
binaryName = Properties::getApplicationPath() + extractFileFromDirectoryPath(PlatformExceptionHandler::application_binary);
|
||||
binaryNameOld = tempFilePath + extractFileFromDirectoryPath(PlatformExceptionHandler::application_binary);
|
||||
resultRename = renameFile(binaryNameOld, binaryName);
|
||||
|
||||
result = upgradeFilesInTemp();
|
||||
//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\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);
|
||||
}
|
||||
|
||||
console.addLine("Successfully updated, please restart!",true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user