IF EXIST on an empty drive should not lead to the 'Abort, Retry, Fail' prompt
Tested with current SvarCOM 2022.4:
C:\>if exist c:\nul echo yes yes C:\>if exist c:\null echo yes C:\>if exist d:\nul echo yes yes C:\>if exist z:\nul echo yes yes C:\>if exist z:\null echo yes C:\>
On my SvarDOS system I only have drives A:, (phantom drive B:), and C:. No D: or Z:. MS-DOS 6.22. command.com gives the same results with the FreeDOS 11/2016 kernel.
MS-DOS 6.22 kernel + command.com does not display 'yes' for tests 3 and 4.
Looks like a FreeDOS kernel bug. Will now test against the FD 1.3 kernel.
Reply To bttr
Looks like a FreeDOS kernel bug. Will now test against the FD 1.3 kernel.
It's still present. :-(
if exist K:\NUL echo K: is present is broken in kernel 2042 the bug is caused by a change in TrueName(), where code was changed from cdsEntry = get_cds(result); if (cdsEntry == NULL) return DE_PATHNOTFND; to dhp = IsDevice(src); cdsEntry = get_cds(result); if (cdsEntry == NULL) { /* workaround for a device prefixed with invalid drive (e.g. "@:NUL") */ /* (MS-DOS always return drive P: for invalid drive. Why P:?) */ if (dhp) { result = default_drive; cdsEntry = get_cds(result); if (cdsEntry == NULL) return DE_PATHNOTFND; } else return DE_PATHNOTFND; } now truename("e:\NUL") returns not 'path not found', but 'isDevice' probably by fixing one bug, another bug was introduced. Unfortunately I don't know what bug the changed is supposed to fix... who introduced this change and why? comments? Tom
And that's it. No further activities in this 2017 thread.
Anyway, the original "IF EXIST on an empty drive should not lead to the 'Abort, Retry, Fail' prompt" seems already fixed in current SvarCOM.
I tested with existing, non-existing, and empty (= floppy) drives.
Um, but MS-DOS 6.22 behaves different. It displays such a prompt. I thought, we want MS-DOS compatibility?
Reply To bttr
Anyway, the original "IF EXIST on an empty drive should not lead to the 'Abort, Retry, Fail' prompt" seems already fixed in current SvarCOM.
No, there is simply no int24h handler in SvarCOM currently.
Um, but MS-DOS 6.22 behaves different. It displays such a prompt. I thought, we want MS-DOS compatibility?
That's good news then, means there's nothing actually to fix. It would appear FreeCOM has a "bug" in this regard then.
(from SVARCOM TODO LIST todo.txt)