Commit 1e8bdea
committed
DIR: don't display invalid data with devices
When doing `DIR NUL` findfirst will actually return success
with an attribute indicating a device exists with that name.
MS-DOS shows 'File not found' in this case, but Comcom
(and also FreeCOM) can display invalid data, so let's
correct that. Since the required constant _A_DEVICE isn't
always present in `dos.h`, let's define it when necessary.
Before:
~~~
C:\>dir nul
Volume in drive c is IR DXXXXS C
Directory of c:\
2025-10-30 16:41 0 NUL
1 file(s) 0 bytes
0 dir(s) 48.7 GB free
~~~
With patch:
~~~
C:\>dir nul
Volume in drive c is IR DXXXXS C
Directory of c:\
File not found
~~~1 parent ba4c1b1 commit 1e8bdea
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
2693 | 2696 | | |
2694 | 2697 | | |
2695 | 2698 | | |
2696 | | - | |
| 2699 | + | |
| 2700 | + | |
2697 | 2701 | | |
2698 | 2702 | | |
2699 | 2703 | | |
| |||
0 commit comments