1
0
Fork 0

fixed opendir problem in win98 (trailing backslash check)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@777
This commit is contained in:
Ulf Wohlers 2003-03-18 20:39:08 +00:00
parent 367b446067
commit 8a8a1f0415

View file

@ -20,10 +20,14 @@
DIR * opendir(const char *dirname) {
static DIR dir;
int len;
/* Stash the directory name */
strcpy(dir.pathName,dirname);
strcat(dir.pathName,"\\*.*");
len = strlen(dirname);
if ((len>0) && (dirname[len-1]=='\\')) strcat(dir.pathName,"*.*");
else strcat(dir.pathName,"\\*.*");
/* set the handle to invalid and set the firstTime flag */
dir.handle = INVALID_HANDLE_VALUE;