setting executable overwrites the script values
This commit is contained in:
parent
89bb4b2edc
commit
40c35f93cf
|
@ -412,20 +412,22 @@ void UpdateInstaller::restartMainApp()
|
||||||
std::string command;
|
std::string command;
|
||||||
std::list<std::string> args;
|
std::list<std::string> args;
|
||||||
|
|
||||||
for (std::vector<UpdateScriptFile>::const_iterator iter = m_script->filesToInstall().begin();
|
if (!m_executable.empty())
|
||||||
iter != m_script->filesToInstall().end();
|
|
||||||
iter++)
|
|
||||||
{
|
|
||||||
if (iter->isMainBinary)
|
|
||||||
{
|
|
||||||
command = m_installDir + '/' + iter->path;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (command.empty() && !m_executable.empty())
|
|
||||||
{
|
{
|
||||||
command = m_installDir + '/' + m_executable;
|
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())
|
if (!command.empty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue