summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/File.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-11-26 18:21:06 +0100
committerAlexander Harkness <bearbin@gmail.com>2013-11-26 18:21:06 +0100
commit0de95a215f960c51bd7180218c1acef2414ce7d0 (patch)
tree80c80002565be1dc2fa537416ca7e6a1fd3e9da0 /src/OSSupport/File.cpp
parentMerge branch 'master' into foldermove2 (diff)
parentcWorld::SpawnExperienceOrb() now returns the entity ID of the spawned orb. (diff)
downloadcuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar.gz
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar.bz2
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar.lz
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar.xz
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.tar.zst
cuberite-0de95a215f960c51bd7180218c1acef2414ce7d0.zip
Diffstat (limited to 'src/OSSupport/File.cpp')
-rw-r--r--src/OSSupport/File.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/OSSupport/File.cpp b/src/OSSupport/File.cpp
index 274aa52da..9f7c0d439 100644
--- a/src/OSSupport/File.cpp
+++ b/src/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
{