From 31210fac8558f845a8e71de78f998efa2ff10377 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 16 May 2016 16:30:46 +0200 Subject: [PATCH] Changed: Add more checks for data --- .../client/ryzom_installer/src/configfile.cpp | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp index 141fef5e3..e7d883314 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp @@ -410,11 +410,20 @@ bool CConfigFile::areRyzomDataInstalledIn(const QString &directory) const // directory doesn't exist if (!dir.exists()) return false; - if (!dir.cd("data") && dir.exists()) return false; + if (!dir.cd("data") || !dir.exists()) return false; // at least 200 BNP in data directory if (dir.entryList(QStringList() << "*.bnp", QDir::Files).size() < 200) return false; + // fonts.bnp is required + if (!dir.exists("fonts.bnp")) return false; + + // gamedev.bnp is required + if (!dir.exists("gamedev.bnp")) return false; + + // interfaces.bnp is required + if (!dir.exists("interfaces.bnp")) return false; + // TODO: more checks return true; @@ -550,16 +559,18 @@ CConfigFile::InstallationStep CConfigFile::getNextStep() const { // user decided to copy files - // selected directory contains Ryzom files (shouldn't fail) - if (!areRyzomDataInstalledIn(getSrcServerDirectory())) - { - return ShowWizard; - } - // data are not copied if (!areRyzomDataInstalledIn(serverDirectory)) { - return CopyServerFiles; + // selected directory contains Ryzom files (shouldn't fail) + if (areRyzomDataInstalledIn(getSrcServerDirectory())) + { + return CopyServerFiles; + } + else + { + return ShowWizard; + } } // client is not extracted from BNP