Skip to content

Commit

Permalink
Fix tight loop when attempting to delete OS R/O file.
Browse files Browse the repository at this point in the history
  • Loading branch information
MockbaTheBorg authored May 3, 2024
1 parent 25da8cb commit 596adf9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion RunCPM/disk.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,12 @@ uint8 _DeleteFile(uint16 fcbaddr) {
}
#endif
_FCBtoHostname(tmpFCB, &filename[0]);
if (_sys_deletefile(&filename[0]))
if (_sys_deletefile(&filename[0])) {
deleted = 0x00;
} else {
_error(errWRITEPROT);
break;
}
result = _SearchFirst(fcbaddr, FALSE); // FALSE = Does not create a fake dir entry when finding the file
}
} else {
Expand Down

0 comments on commit 596adf9

Please sign in to comment.