diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-25 23:16:53 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-25 23:16:53 +0300 |
commit | dcef5183f7c2a12f7bd4990bc9a3fe9d27bef55b (patch) | |
tree | 687684c8378ef0449c934da7c337beb0896e8ddf /src/filesys.cpp | |
parent | 728d01ef4b8c7537232ac6c5d0b30efbbfff288d (diff) | |
download | minetest-dcef5183f7c2a12f7bd4990bc9a3fe9d27bef55b.tar.gz minetest-dcef5183f7c2a12f7bd4990bc9a3fe9d27bef55b.tar.bz2 minetest-dcef5183f7c2a12f7bd4990bc9a3fe9d27bef55b.zip |
Small fix to fs::GetDirListing when trying to list an inexistent directory
Diffstat (limited to 'src/filesys.cpp')
-rw-r--r-- | src/filesys.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/filesys.cpp b/src/filesys.cpp index 805aae6ae..e8a9e88db 100644 --- a/src/filesys.cpp +++ b/src/filesys.cpp @@ -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 { |