From 59527ecc49b1805707aa7a85b235e3089db0cd14 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 4 Nov 2016 20:22:42 +0100 Subject: [PATCH] Changed: Don't display an error if file doesn't exist --- code/ryzom/tools/translation_tools/main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/ryzom/tools/translation_tools/main.cpp b/code/ryzom/tools/translation_tools/main.cpp index 456cd871e..906fe6bd6 100644 --- a/code/ryzom/tools/translation_tools/main.cpp +++ b/code/ryzom/tools/translation_tools/main.cpp @@ -2972,12 +2972,16 @@ void preprocessTextFile(const std::string &filename, ucstring name = line.substr(firstFilename +1, lastFilename - firstFilename -1); string subFilename = name.toString(); + + if (!CFile::fileExists(subFilename)) { - CIFile testFile; - if (!testFile.open(subFilename)) - { // try to open the include file relative to current file - subFilename = CFile::getPath(filename)+subFilename; + subFilename = CFile::getPath(filename)+subFilename; + + if (!CFile::fileExists(subFilename)) + { + nlwarning("Unable to open %s", subFilename.c_str()); + subFilename.clear(); } } preprocessTextFile(subFilename, outputResult);