Rewritten File::getPathSeparators()

pull/28/head
Tatsuhiro Tsujikawa 2012-09-24 23:04:42 +09:00
parent d95a179876
commit 0144397e4b
2 changed files with 5 additions and 6 deletions

View File

@ -294,14 +294,13 @@ std::string File::getCurrentDir()
#endif // !__MINGW32__ #endif // !__MINGW32__
} }
const std::string& File::getPathSeparators() const char* File::getPathSeparators()
{ {
#ifdef __MINGW32__ #ifdef __MINGW32__
static std::string s = "/\\"; return "/\\";
#else // !__MINGW32__ #else // !__MINGW32__
static std::string s = "/"; return "/";
#endif // !__MINGW32__ #endif // !__MINGW32__
return s;
} }
} // namespace aria2 } // namespace aria2

View File

@ -119,8 +119,8 @@ public:
// directory cannot be retrieved or its length is larger than 2048, // directory cannot be retrieved or its length is larger than 2048,
// returns ".". // returns ".".
static std::string getCurrentDir(); static std::string getCurrentDir();
// Returns possible path separators for the underlining platform. // Returns possible path separators for the underlying platform.
static const std::string& getPathSeparators(); static const char* getPathSeparators();
}; };
} // namespace aria2 } // namespace aria2