diff --git a/code/CInterfaceIOWrapper.h b/code/CInterfaceIOWrapper.h index 01fcc7422..8508e4f54 100644 --- a/code/CInterfaceIOWrapper.h +++ b/code/CInterfaceIOWrapper.h @@ -114,10 +114,9 @@ public: // ................................................................... bool Exists( const char* pFile) const { - CIOSystemWrapper* pip = const_cast(this); - IOStream* p = pip->Open(pFile); + aiFile* p = mFileSystem->OpenProc(mFileSystem,pFile,"rb"); if (p){ - pip->Close(p); + mFileSystem->CloseProc(mFileSystem,p); return true; } return false;