diff --git a/source/code/os.cpp b/source/code/os.cpp index d821fb6..47fdc6b 100644 --- a/source/code/os.cpp +++ b/source/code/os.cpp @@ -139,8 +139,8 @@ std::vector OsGetDirFileList(const std::string& path) { //At the moment dirent.h is used for all OS. Should have a Unicode version on Windows. std::vector ret; DIR* dir = opendir(path.c_str()); - struct dirent* ent; if (dir) { + struct dirent* ent; while ((ent = readdir (dir)) ) { if (ent->d_name[0] == '.') { continue;