diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-25 22:45:22 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-25 22:45:22 +0100 |
commit | 56f13f83bb7126ca7c651a0bb70e862e1d867b9e (patch) | |
tree | a171e0d8194e9108f3493571810a2f385a437902 /source | |
parent | Merge remote-tracking branch 'origin/master' into redstonefixes (diff) | |
parent | Fixed cFile compilation on Linux. (diff) | |
download | cuberite-56f13f83bb7126ca7c651a0bb70e862e1d867b9e.tar cuberite-56f13f83bb7126ca7c651a0bb70e862e1d867b9e.tar.gz cuberite-56f13f83bb7126ca7c651a0bb70e862e1d867b9e.tar.bz2 cuberite-56f13f83bb7126ca7c651a0bb70e862e1d867b9e.tar.lz cuberite-56f13f83bb7126ca7c651a0bb70e862e1d867b9e.tar.xz cuberite-56f13f83bb7126ca7c651a0bb70e862e1d867b9e.tar.zst cuberite-56f13f83bb7126ca7c651a0bb70e862e1d867b9e.zip |
Diffstat (limited to 'source')
-rw-r--r-- | source/OSSupport/File.cpp | 9 | ||||
-rw-r--r-- | source/OSSupport/Socket.cpp | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/source/OSSupport/File.cpp b/source/OSSupport/File.cpp index 274aa52da..9f7c0d439 100644 --- a/source/OSSupport/File.cpp +++ b/source/OSSupport/File.cpp @@ -394,13 +394,14 @@ AStringVector cFile::GetFolderContents(const AString & a_Folder) DIR * dp; struct dirent *dirp; - if (*a_Directory == 0) + AString Folder = a_Folder; + if (Folder.empty()) { - a_Directory = "."; + Folder = "."; } - if ((dp = opendir(a_Directory)) == NULL) + if ((dp = opendir(Folder.c_str())) == NULL) { - LOGERROR("Error (%i) opening directory \"%s\"\n", errno, a_Directory ); + LOGERROR("Error (%i) opening directory \"%s\"\n", errno, Folder.c_str()); } else { diff --git a/source/OSSupport/Socket.cpp b/source/OSSupport/Socket.cpp index c461d38a4..f25f800c2 100644 --- a/source/OSSupport/Socket.cpp +++ b/source/OSSupport/Socket.cpp @@ -210,9 +210,6 @@ bool cSocket::BindToAnyIPv4(unsigned short a_Port) bool cSocket::BindToAnyIPv6(unsigned short a_Port) { - // Cannot use socckaddr_in6, because it is not defined in the default VS2008 SDK - // Must jump through hoops here - sockaddr_in6 local; memset(&local, 0, sizeof(local)); |