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:
parent
db3f232fc9
commit
91d11c88b7
|
@ -102,7 +102,7 @@ namespace FileUtils {
|
||||||
{
|
{
|
||||||
std::vector<std::string> fileList;
|
std::vector<std::string> fileList;
|
||||||
#if defined( __unix__ ) || defined( __APPLE__ )
|
#if defined( __unix__ ) || defined( __APPLE__ )
|
||||||
DIR *dir = opendir(folder);
|
DIR *dir = opendir(strlen(folder) > 0 ? folder : ".");
|
||||||
if (dir != nullptr) {
|
if (dir != nullptr) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
struct dirent *dp = readdir(dir);
|
struct dirent *dp = readdir(dir);
|
||||||
|
|
Loading…
Reference in New Issue