forked from Mirrors/openclonk
Make ForEachFile not crash
It still does not work with wildcards, but does nothing in that case now.
parent
4f811263fb
commit
145e647df1
|
@ -878,6 +878,7 @@ int ForEachFile(const char *szDirName, bool (*fnCallback)(const char *)) {
|
|||
#else
|
||||
if (fHasWildcard) fprintf(stderr, "Warning: ForEachFile with * (%s)", szDirName);
|
||||
DIR * d = opendir(szDirName);
|
||||
if (!d) return 0;
|
||||
dirent * ent;
|
||||
while ((ent = readdir(d))) {
|
||||
SCopy(ent->d_name,GetFilename(szFilename));
|
||||
|
|
Loading…
Reference in New Issue