Small fix to fs::GetDirListing when trying to list an inexistent directory
authorPerttu Ahola <celeron55@gmail.com>
Sun, 25 Mar 2012 20:16:53 +0000 (23:16 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 25 Mar 2012 20:16:53 +0000 (23:16 +0300)
src/filesys.cpp

index 805aae6aedfe5bf271e6b354bdf32f827eef9e91..e8a9e88db13aa844820ef3de482f49a6c6bcb524 100644 (file)
@@ -74,9 +74,8 @@ std::vector<DirListNode> GetDirListing(std::string pathstring)
 
        if (hFind == INVALID_HANDLE_VALUE) 
        {
-         errorstream<<"GetDirListing: Invalid file handle. Error is "
-                       <<GetLastError()<<std::endl;
-         retval = (-1);
+               retval = (-1);
+               goto Cleanup;
        } 
        else 
        {