|
@@ -135,8 +135,8 @@ inline void MakeAbsolutePath (const char* in, char* _out)
|
|
|
{
|
|
|
ai_assert(in && _out);
|
|
|
char* ret;
|
|
|
-#ifdef _WIN32
|
|
|
- ret = ::_fullpath(_out, in,PATHLIMIT);
|
|
|
+#if defined _WIN32 && !defined __GNUC__
|
|
|
+ ret = ::_fullpath( _out, in, PATHLIMIT );
|
|
|
#else
|
|
|
// use realpath
|
|
|
ret = realpath(in, _out);
|
|
@@ -167,8 +167,8 @@ bool DefaultIOSystem::ComparePaths (const char* one, const char* second) const
|
|
|
return !ASSIMP_stricmp(temp1,temp2);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-std::string DefaultIOSystem::fileName(std::string path)
|
|
|
+// ------------------------------------------------------------------------------------------------
|
|
|
+std::string DefaultIOSystem::fileName( const std::string &path )
|
|
|
{
|
|
|
std::string ret = path;
|
|
|
std::size_t last = ret.find_last_of("\\/");
|
|
@@ -177,7 +177,8 @@ std::string DefaultIOSystem::fileName(std::string path)
|
|
|
}
|
|
|
|
|
|
|
|
|
-std::string DefaultIOSystem::completeBaseName(std::string path)
|
|
|
+// ------------------------------------------------------------------------------------------------
|
|
|
+std::string DefaultIOSystem::completeBaseName( const std::string &path )
|
|
|
{
|
|
|
std::string ret = fileName(path);
|
|
|
std::size_t pos = ret.find_last_of('.');
|
|
@@ -185,8 +186,8 @@ std::string DefaultIOSystem::completeBaseName(std::string path)
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-std::string DefaultIOSystem::absolutePath(std::string path)
|
|
|
+// ------------------------------------------------------------------------------------------------
|
|
|
+std::string DefaultIOSystem::absolutePath( const std::string &path )
|
|
|
{
|
|
|
std::string ret = path;
|
|
|
std::size_t last = ret.find_last_of("\\/");
|
|
@@ -194,4 +195,6 @@ std::string DefaultIOSystem::absolutePath(std::string path)
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+// ------------------------------------------------------------------------------------------------
|
|
|
+
|
|
|
#undef PATHLIMIT
|