svn mainline r3904:3905 ripsaw8080:

Attempting to unlink (delete) an existing device name returns an access
denied error. Fixes EMM device driver detection, and thus SoundBlaster
sound, in the Striker soccer game. Also add a log message for FindFirst.
This commit is contained in:
Jonathan Campbell 2015-04-09 10:46:06 -07:00
parent 5da3902bf3
commit 1689c9badb
2 changed files with 10 additions and 0 deletions

4
PATCHES-IN-DISPUTE Normal file
View File

@ -0,0 +1,4 @@
mainline patches NOT applied:
svn diff -r 3903:3904 Allow CRTC read/write access on all mirror ports for non-VGA machine types. Fixes Tandy and EGA display in International Hockey booter. Thanks Great Hierophant for testing on real systems.

View File

@ -300,6 +300,7 @@ bool DOS_Rename(char const * const oldname,char const * const newname) {
}
bool DOS_FindFirst(char * search,Bit16u attr,bool fcb_findfirst) {
LOG(LOG_FILES,LOG_NORMAL)("file search attributes %X name %s",attr,search);
DOS_DTA dta(dos.dta());
Bit8u drive;char fullsearch[DOS_PATHLENGTH];
char dir[DOS_PATHLENGTH];char pattern[DOS_PATHLENGTH];
@ -660,6 +661,11 @@ bool DOS_OpenFileExtended(char const * name, Bit16u flags, Bit16u createAttr, Bi
bool DOS_UnlinkFile(char const * const name) {
char fullname[DOS_PATHLENGTH];Bit8u drive;
// An existing device returns an access denied error
if (DOS_FindDevice(name) != DOS_DEVICES) {
DOS_SetError(DOSERR_ACCESS_DENIED);
return false;
}
if (!DOS_MakeName(name,fullname,&drive)) return false;
if(Drives[drive]->FileUnlink(fullname)){
return true;