mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-10 06:31:49 +00:00
setting executable overwrites the script values
This commit is contained in:
parent
89bb4b2edc
commit
40c35f93cf
1 changed files with 13 additions and 11 deletions
|
@ -412,20 +412,22 @@ void UpdateInstaller::restartMainApp()
|
|||
std::string command;
|
||||
std::list<std::string> args;
|
||||
|
||||
for (std::vector<UpdateScriptFile>::const_iterator iter = m_script->filesToInstall().begin();
|
||||
iter != m_script->filesToInstall().end();
|
||||
iter++)
|
||||
{
|
||||
if (iter->isMainBinary)
|
||||
{
|
||||
command = m_installDir + '/' + iter->path;
|
||||
}
|
||||
}
|
||||
|
||||
if (command.empty() && !m_executable.empty())
|
||||
if (!m_executable.empty())
|
||||
{
|
||||
command = m_installDir + '/' + m_executable;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (std::vector<UpdateScriptFile>::const_iterator iter = m_script->filesToInstall().begin();
|
||||
iter != m_script->filesToInstall().end();
|
||||
iter++)
|
||||
{
|
||||
if (iter->isMainBinary)
|
||||
{
|
||||
command = m_installDir + '/' + iter->path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!command.empty())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue