Fixed: Reusing CIFile to load from bnp and from regular files.
--HG-- branch : develop
This commit is contained in:
parent
f065b7f747
commit
82f084982a
1 changed files with 8 additions and 0 deletions
|
@ -157,6 +157,14 @@ bool CIFile::open(const std::string &path, bool text)
|
||||||
|
|
||||||
close();
|
close();
|
||||||
|
|
||||||
|
if ((_IsInBigFile || _IsInXMLPackFile) && path.find('@') == string::npos)
|
||||||
|
{
|
||||||
|
// CIFile can be reused to load file from bnp and from regular files.
|
||||||
|
// Last open happened to be inside bnp and close() may not set _F to NULL.
|
||||||
|
// Opening regular file will fail as _F points to bnp file.
|
||||||
|
_F = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// can't open empty filename
|
// can't open empty filename
|
||||||
if(path.empty ())
|
if(path.empty ())
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue