mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 01:06:19 +00:00
Changed: Check modification time of Installer to determine if it must be copied again, see #279
This commit is contained in:
parent
3e3dbe3595
commit
67d4877889
1 changed files with 13 additions and 1 deletions
|
@ -911,8 +911,20 @@ OperationStep CConfigFile::getInstallNextStep() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString installerDst = getInstallationDirectory() + "/" + server.installerFilename;
|
||||||
|
|
||||||
// if installer not found in installation directory, extract it from BNP
|
// if installer not found in installation directory, extract it from BNP
|
||||||
if (!QFile::exists(getInstallationDirectory() + "/" + server.installerFilename))
|
if (QFile::exists(installerDst))
|
||||||
|
{
|
||||||
|
QString installerSrc = getInstallerCurrentFilePath();
|
||||||
|
|
||||||
|
// copy it too if destination one if older than new one
|
||||||
|
uint64 srcDate = QFileInfo(installerSrc).lastModified().toTime_t();
|
||||||
|
uint64 dstDate = QFileInfo(installerDst).lastModified().toTime_t();
|
||||||
|
|
||||||
|
if (srcDate > dstDate) return CopyInstaller;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return CopyInstaller;
|
return CopyInstaller;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue