Fix test for return value of GetCurrentDirectory() on Windows.

GetCurrentDirectory() returns zero on error or the length of
the path otherwise.
This commit is contained in:
Robert Knight 2011-09-16 15:01:02 +01:00
parent 61c717e6d6
commit 4d1dbe8059

View file

@ -543,7 +543,7 @@ std::string FileUtils::getcwd() throw (IOException)
return std::string(path);
#else
char path[MAX_PATH];
if (GetCurrentDirectory(MAX_PATH,path) != 0)
if (GetCurrentDirectory(MAX_PATH,path) == 0)
{
throw FileUtils::IOException("Failed to get current directory");
}