Recent Commits to freecom:master

  • 30/10/2025 16:28

    DIR: don't display invalid data with devices

    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 FreeCOM
    (and also Comcom64) can display invalid data, so let's
    correct that. Since the required constant FA_DEVICE isn't
    always present in `dos.h`, let's define it when necessary.
    
    [https://github.com/FDOS/freecom/issues/181]
    
    Before (C: is MFS, D: is FAT16):
    ~~~
    C:\>dir nul
     Volume in drive C is IR DXXXXS C
     Directory of C:\
    
    NUL                      0  10-30-25  6:55p
             1 file(s)              0 bytes
             0 dir(s)     49,839 Mega bytes free
    C:\>d:
    
    D:\>dir nul
     Volume in drive D has no label
     Volume Serial Number is 4A09-DBB4
    
     Directory of D:\
    
    NUL                      0  10-30-25  6:55p
             1 file(s)              0 bytes
             0 dir(s)      42,698,752 bytes free
    ~~~
    
    With patch (C: is MFS, D: is FAT16):
    ~~~
    C:\>dir nul
     Volume in drive C is IR DXXXXS C
     Directory of C:\
    
    File not found.
    
    C:\>d:
    
    D:\>dir nul
     Volume in drive D has no label
     Volume Serial Number is 4A09-DBB4
     Directory of D:\
    
    File not found.
    ~~~
    Tags:

Log in