mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-29 15:16:01 +00:00
Changed: Don't display an error if file doesn't exist
This commit is contained in:
parent
95dd3ce9d0
commit
0caa004af2
1 changed files with 8 additions and 4 deletions
|
@ -2972,12 +2972,16 @@ void preprocessTextFile(const std::string &filename,
|
||||||
|
|
||||||
ucstring name = line.substr(firstFilename +1, lastFilename - firstFilename -1);
|
ucstring name = line.substr(firstFilename +1, lastFilename - firstFilename -1);
|
||||||
string subFilename = name.toString();
|
string subFilename = name.toString();
|
||||||
|
|
||||||
|
if (!CFile::fileExists(subFilename))
|
||||||
{
|
{
|
||||||
CIFile testFile;
|
|
||||||
if (!testFile.open(subFilename))
|
|
||||||
{
|
|
||||||
// try to open the include file relative to current file
|
// 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);
|
preprocessTextFile(subFilename, outputResult);
|
||||||
|
|
Loading…
Reference in a new issue