|
|
|
@ -719,7 +719,7 @@ void CPatchManager::stopPatchThread()
|
|
|
|
|
// ****************************************************************************
|
|
|
|
|
void CPatchManager::deleteBatchFile()
|
|
|
|
|
{
|
|
|
|
|
deleteFile(UpdateBatchFilename, false, false);
|
|
|
|
|
deleteFile(ClientRootPath + UpdateBatchFilename, false, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ****************************************************************************
|
|
|
|
@ -938,21 +938,21 @@ void CPatchManager::executeBatchFile()
|
|
|
|
|
chmod(batchFilename.c_str(), S_IRWXU);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
std::string cmdLine = "\"" + batchFilename + "\" " + LoginLogin + " " + LoginPassword;
|
|
|
|
|
std::string arguments = LoginLogin + " " + LoginPassword;
|
|
|
|
|
|
|
|
|
|
if (!r2Mode)
|
|
|
|
|
{
|
|
|
|
|
cmdLine += " " + toString(LoginShardId);
|
|
|
|
|
arguments += " " + toString(LoginShardId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (launchProgram("", cmdLine, false))
|
|
|
|
|
if (launchProgram(batchFilename, arguments, false))
|
|
|
|
|
{
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// error occurs during the launch
|
|
|
|
|
string str = toString("Can't execute '%s': code=%d %s (error code 30)", UpdateBatchFilename.c_str(), errno, strerror(errno));
|
|
|
|
|
string str = toString("Can't execute '%s': code=%d %s (error code 30)", batchFilename.c_str(), errno, strerror(errno));
|
|
|
|
|
throw Exception (str);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|