Do the right thing with empty directory path.

When we convert a file that's in our CWD, on Unix the folder component
of the path will simply be "", whereas opendir() wants ".".

I want to take another more substantial pass at texture resolution, once
we're out of urgent bugfix mode.
This commit is contained in:
Par Winzell 2017-10-25 12:02:25 -07:00
parent db3f232fc9
commit 91d11c88b7
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ namespace FileUtils {
{
std::vector<std::string> fileList;
#if defined( __unix__ ) || defined( __APPLE__ )
DIR *dir = opendir(folder);
DIR *dir = opendir(strlen(folder) > 0 ? folder : ".");
if (dir != nullptr) {
for (;;) {
struct dirent *dp = readdir(dir);