From 6ad79f707ef0224738c70a8661d0732a785f96c6 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 14 Aug 2016 13:29:27 +0200 Subject: [PATCH] Changed: Check modification time of Installer to determine if it must be copied again, see #279 --- .../client/ryzom_installer/src/configfile.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp index f59ee44df..345dd80bc 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp @@ -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 (!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; }