Allow empty string to be passed to file_getdirlist
This allows the open/save dialogs to work in the editor when a filename without a path separator is passed (which is the default)
This commit is contained in:
parent
d41146bcbd
commit
e29a4513b6
|
@ -41,7 +41,7 @@ static PHYSFSX_counted_list file_getdirlist(const char *dir)
|
|||
{
|
||||
ntstring<PATH_MAX - 1> path;
|
||||
auto dlen = path.copy_if(dir);
|
||||
if (!dlen || !path.copy_if(dlen, "/"))
|
||||
if ((!dlen && strlen(dir) > 0) || !path.copy_if(dlen, "/"))
|
||||
return nullptr;
|
||||
++ dlen;
|
||||
PHYSFSX_counted_list list{PHYSFS_enumerateFiles(dir)};
|
||||
|
|
Loading…
Reference in a new issue