| Title | [lDOS] FindFirst with device name and label attribute shouldn't find device |
|---|---|
| Author | E. C. Masloch |
| Created | 2026-06-07 09:00:40 +0200 Jun Sun |
| State | closed |
FindFirst with the label attribute (mask 8) set should only ever find a volume label, even if a file, subdirectory, or character device matches the search name mask.
If the search name matched a character device name without wildcards, the first label search would find this character device.
Test program: NASM source text, executable,
run as testfind.com A: to search for "CON" with attribute 8.
Solution is to init Attrib from SAttrib before calling DEVNAME, so that it can correctly detect a label search. This is exactly what MS-DOS v5 does (determined by debugging). The fix was attempted in hg 713242bd5dc3 on 2026-05-19, but this patched the wrong branch of an
%if FALSEconstruct. The fix was copied to apply to the correct code in hg ce4b8b95ae96 on 2026-05-25.