1
0

StringUtils' GetDirectoryContents() now accepts empty string and interprets it as "current directory" (*nix fix)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@450 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-04-04 10:50:43 +00:00
parent b5a646d94a
commit 0d0ad37da1

View File

@ -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
{