diff options
author | madmaxoft <github@xoft.cz> | 2013-11-25 21:24:41 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-11-25 21:24:41 +0100 |
commit | 0fef69e6124d6725ef42917beccf2d6a1e4a7918 (patch) | |
tree | 90133869d05053ddc5e56b9382757ba13d353aa5 /source/OSSupport | |
parent | AnvilStats: Fixed compilation. (diff) | |
download | cuberite-0fef69e6124d6725ef42917beccf2d6a1e4a7918.tar cuberite-0fef69e6124d6725ef42917beccf2d6a1e4a7918.tar.gz cuberite-0fef69e6124d6725ef42917beccf2d6a1e4a7918.tar.bz2 cuberite-0fef69e6124d6725ef42917beccf2d6a1e4a7918.tar.lz cuberite-0fef69e6124d6725ef42917beccf2d6a1e4a7918.tar.xz cuberite-0fef69e6124d6725ef42917beccf2d6a1e4a7918.tar.zst cuberite-0fef69e6124d6725ef42917beccf2d6a1e4a7918.zip |
Diffstat (limited to '')
-rw-r--r-- | source/OSSupport/File.cpp | 9 |
1 files changed, 5 insertions, 4 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 { |