setting executable overwrites the script values

This commit is contained in:
jackeri 2014-12-12 14:43:57 +02:00
parent 89bb4b2edc
commit 40c35f93cf
1 changed files with 13 additions and 11 deletions

View File

@ -412,6 +412,12 @@ void UpdateInstaller::restartMainApp()
std::string command;
std::list<std::string> args;
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++)
@ -421,10 +427,6 @@ void UpdateInstaller::restartMainApp()
command = m_installDir + '/' + iter->path;
}
}
if (command.empty() && !m_executable.empty())
{
command = m_installDir + '/' + m_executable;
}
if (!command.empty())