diff --git a/source/StringUtils.cpp b/source/StringUtils.cpp index 1e629c25f..46c20b3d8 100644 --- a/source/StringUtils.cpp +++ b/source/StringUtils.cpp @@ -182,9 +182,13 @@ AStringList GetDirectoryContents(const char * a_Directory) DIR * dp; struct dirent *dirp; + if (*a_Directory == 0) + { + a_Directory = "."; + } if ((dp = opendir(a_Directory)) == NULL) { - LOGERROR("Error (%i) opening %s\n", errno, a_Directory ); + LOGERROR("Error (%i) opening directory \"%s\"\n", errno, a_Directory ); } else {