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:
parent
367b446067
commit
8a8a1f0415
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue