commit 84003a0e
Lessned scope of a variable
Changed files
| M | source/code/os.cpp before |
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<std::string> OsGetDirFileList(const std::string& path) {
//At the moment dirent.h is used for all OS. Should have a Unicode version on Windows.
std::vector<std::string> 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;