Ticket #44265

IF EXIST on an empty drive should not lead to the 'Abort, Retry, Fail' prompt

Open Date: 2022-04-02 18:45 Last Update: 2022-04-12 17:35

Reporter:
Owner:
Status:
Closed
Component:
MileStone:
(None)
Priority:
7
Severity:
5 - Medium
Resolution:
Won't Fix
File:
None

Details

(from SVARCOM TODO LIST todo.txt)

Ticket History (3/8 Histories)

2022-04-02 18:45 Updated by: bttr
  • New Ticket "IF EXIST on an empty drive should not lead to the 'Abort, Retry, Fail' prompt" created
2022-04-02 19:12 Updated by: bttr
Comment

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.

2022-04-02 19:17 Updated by: bttr
Comment

Reply To bttr

Looks like a FreeDOS kernel bug. Will now test against the FD 1.3 kernel.

It's still present. :-(

2022-04-02 19:36 Updated by: bttr
Comment

From https://sourceforge.net/p/freedos/mailman/freedos-kernel/thread/59465635.2205982.1485485049634@mail.yahoo.com/

   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.

2022-04-02 19:52 Updated by: bttr
Comment

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.

2022-04-02 19:54 Updated by: bttr
Comment

Um, but MS-DOS 6.22 behaves different. It displays such a prompt. I thought, we want MS-DOS compatibility?

2022-04-02 21:33 Updated by: mateuszviste
Comment

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.

2022-04-12 17:35 Updated by: mateuszviste
  • Status Update from Open to Closed
  • Resolution Update from None to Won't Fix

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login