1
0
Fork 0

Fixed error codes for findfirst/findnext and a charactor for makename

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@473
This commit is contained in:
Sjoerd van der Berg 2002-11-03 11:15:46 +00:00
parent 108e6efd32
commit 664583a3c3

View file

@ -78,6 +78,7 @@ bool DOS_MakeName(char * name,char * fullname,Bit8u * drive) {
case '\\': case '$': case '#': case '@': case '(': case ')':
case '!': case '%': case '{': case '}': case '`': case '~':
case '_': case '-': case '.': case '*': case '?': case '&':
case '\'':
upname[w++]=c;
break;
default:
@ -210,14 +211,14 @@ bool DOS_FindFirst(char * search,Bit16u attr) {
}
dta.SetupSearch(drive,(Bit8u)attr,pattern);
if (Drives[drive]->FindFirst(dir,dta)) return true;
DOS_SetError(DOSERR_FILE_NOT_FOUND);
DOS_SetError(DOSERR_NO_MORE_FILES);
return false;
}
bool DOS_FindNext(void) {
DOS_DTA dta(dos.dta);
if (Drives[dta.GetSearchDrive()]->FindNext(dta)) return true;
DOS_SetError(DOSERR_FILE_NOT_FOUND);
DOS_SetError(DOSERR_NO_MORE_FILES);
return false;
}