diff --git a/code/ObjFileParser.cpp b/code/ObjFileParser.cpp index 346c734fc..027d99543 100644 --- a/code/ObjFileParser.cpp +++ b/code/ObjFileParser.cpp @@ -544,12 +544,10 @@ void ObjFileParser::getMaterialLib() } else { absName = strMatName; } - //IOStream *pFile = m_pIO->Open( strMatName ); IOStream *pFile = m_pIO->Open( absName ); - if (!pFile ) - { - DefaultLogger::get()->error("OBJ: Unable to locate material file " + strMatName ); + if (!pFile ) { + DefaultLogger::get()->error( "OBJ: Unable to locate material file " + strMatName ); m_DataIt = skipLine( m_DataIt, m_DataItEnd, m_uiLine ); return; } diff --git a/include/assimp/IOSystem.hpp b/include/assimp/IOSystem.hpp index 81b3e910a..321509de6 100644 --- a/include/assimp/IOSystem.hpp +++ b/include/assimp/IOSystem.hpp @@ -105,18 +105,14 @@ public: * @param pFile Path to the file * @return true if there is a file with this path, else false. */ - virtual bool Exists( const char* pFile) const = 0; - - // ------------------------------------------------------------------- /** @brief Returns the system specific directory separator * @return System specific directory separator */ virtual char getOsSeparator() const = 0; - // ------------------------------------------------------------------- /** @brief Open a new file with a given path. * @@ -142,8 +138,6 @@ public: inline IOStream* Open(const std::string& pFile, const std::string& pMode = std::string("rb")); - - // ------------------------------------------------------------------- /** @brief Closes the given file and releases all resources * associated with it. @@ -174,9 +168,31 @@ public: inline bool ComparePaths (const std::string& one, const std::string& second) const; + // ------------------------------------------------------------------- + /** @brief Pushes a new directory onto the directory stack. + * @param path Path to push onto the stack. + * @return True, when push was successful, false if path is empty. + */ virtual bool PushDirectory( const std::string &path ); + + // ------------------------------------------------------------------- + /** @brief Returns the top directory from the stack. + * @return The directory on the top of the stack. + * Returns empty when no directory was pushed to the stack. + */ virtual const std::string &CurrentDirectory() const; + + // ------------------------------------------------------------------- + /** @brief Returns the number of directories stored on the stack. + * @return The number of directories of the stack. + */ virtual size_t StackSize() const; + + // ------------------------------------------------------------------- + /** @brief Pops the top directory from the stack. + * @return True, when a directory was on the stack. False if no + * directory was on the stack. + */ virtual bool PopDirectory(); private: