From 596adf98c36b6281a2f3fb2b12a480c08f462344 Mon Sep 17 00:00:00 2001 From: Mockba the Borg Date: Fri, 3 May 2024 11:44:25 -0400 Subject: [PATCH] Fix tight loop when attempting to delete OS R/O file. --- RunCPM/disk.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RunCPM/disk.h b/RunCPM/disk.h index b5691e7..933b9b2 100644 --- a/RunCPM/disk.h +++ b/RunCPM/disk.h @@ -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 {