DIR* opendir(const char* sDirName){
DIR* dp = (DIR*)malloc(sizeof(DIR));
dp->hDirectory = 0;/* if zero, we must do a FindFirstFile */
strcpy(dp->sDirName, sDirName);/* remember for FindFirstFile */
strcat(dp->sDirName, "*");
return dp;
}
And, finally, the application;
It simply skips the while loop. I checked the error code on readdir and it gave me this:
readdir(): No such file or directory
GOD_DIR is the default "../gods/"
I have tried putting the argument directly into the call, I've tried putting the entire directory path in there… I don't really know what to do. I searched around but I couldn't find much.