From 508b5fdd24f11d9b99529db9928e46780ae4bf67 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 3 Sep 2016 10:14:06 +0200 Subject: [PATCH] Changed: QDir.cd already checks if directory exists, see #279 --HG-- branch : develop --- code/ryzom/tools/client/ryzom_installer/src/configfile.cpp | 4 ++-- code/ryzom/tools/client/ryzom_installer/src/filescleaner.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp index 6e978cd80..b94a75358 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp @@ -679,7 +679,7 @@ bool CConfigFile::foundTemporaryFiles(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")) return false; QStringList filter; filter << "*.string_cache"; @@ -695,7 +695,7 @@ bool CConfigFile::foundTemporaryFiles(const QString &directory) const if (!dir.entryList(filter, QDir::Files).isEmpty()) return true; // fonts directory is not needed anymore - if (dir.exists("fonts.bnp") && dir.cd("fonts") && dir.exists()) return true; + if (dir.exists("fonts.bnp") && !dir.cd("fonts")) return true; return false; } diff --git a/code/ryzom/tools/client/ryzom_installer/src/filescleaner.cpp b/code/ryzom/tools/client/ryzom_installer/src/filescleaner.cpp index be62ee2a9..c3830dbc1 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/filescleaner.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/filescleaner.cpp @@ -46,7 +46,7 @@ bool CFilesCleaner::exec() // directory doesn't exist if (!dir.exists()) return false; - if (!dir.cd("data") && dir.exists()) return false; + if (!dir.cd("data")) return false; QStringList filter; filter << "*.string_cache"; @@ -79,7 +79,7 @@ bool CFilesCleaner::exec() } // fonts directory is not needed anymore if fonts.bnp exists - if (dir.exists("fonts.bnp") && dir.cd("fonts") && dir.exists()) + if (dir.exists("fonts.bnp") && dir.cd("fonts")) { dir.removeRecursively(); }