diff --git a/cocos/platform/win32/CCFileUtils-win32.cpp b/cocos/platform/win32/CCFileUtils-win32.cpp index 49e1f4c675..3865e12cd6 100644 --- a/cocos/platform/win32/CCFileUtils-win32.cpp +++ b/cocos/platform/win32/CCFileUtils-win32.cpp @@ -123,9 +123,9 @@ bool FileUtilsWin32::isFileExistInternal(const std::string& strFilePath) const bool FileUtilsWin32::isAbsolutePath(const std::string& strPath) const { - if ( strPath.length() > 2 + if ( (strPath.length() > 2 && ( (strPath[0] >= 'a' && strPath[0] <= 'z') || (strPath[0] >= 'A' && strPath[0] <= 'Z') ) - && strPath[1] == ':') + && strPath[1] == ':') || (strPath[0] == '/' && strPath[1] == '/')) { return true; }