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:
parent
b5a646d94a
commit
0d0ad37da1
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user