diff --git a/Src/paths.cpp b/Src/paths.cpp index 4ce246223f3..166d773267e 100644 --- a/Src/paths.cpp +++ b/Src/paths.cpp @@ -161,7 +161,7 @@ static bool IsDirName(const String& sDir) // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/findfirstfile.asp // You cannot use root directories as the lpFileName input string for FindFirstFile - with or without a trailing backslash. size_t count = 0; - if ((sDir[0] && sDir[1] == ':' && sDir[2] == '\0') || + if ((sDir[0] && sDir[1] == ':' && (sDir[2] == '\0' || (sDir[2] == '\\' && sDir[3] == '\0'))) || // \\host\share or \\host\share\ (sDir[0] == '\\' && sDir[1] == '\\' && (count = std::count(sDir.begin(), sDir.end(), ('\\'))) <= 4 &&