[Freedos-kernel] Checking NUL directory/drive is broken in 2042
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 ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] Checking NUL directory/drive is broken in 2042
Tom, screenshots at http://imgur.com/a/h9x9c showing kernel 2042 always identifying e:\nul as present (attrib e:\nul or if exist e:\nul), even though it is not. Kernel 2041 correctly identifies it as not present. A fix for this would be great so I can again check for drive/dir existence using the NUL filename. Thank you,Nando On Friday, 27 January 2017, 3:42, Tom Ehlert wrote: Hi, > Was using FreeDOS 1.1 2040 kernel? previously and could check for > drive or directory existence with the NUL device: > If exist c:\nul echo C: exists > If exist c:\mydir\nul echo C:\mydir exists > This behavior is broken with 2042, no longer being able to identify if a > drive/dir exists anymore. I tried to reproduce this here, and I think that it behaves exactly as it should. can you be more specific how it fails ? Tom -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] Checking NUL directory/drive is broken in 2042
Hi, > Was using FreeDOS 1.1 2040 kernel? previously and could check for > drive or directory existence with the NUL device: > If exist c:\nul echo C: exists > If exist c:\mydir\nul echo C:\mydir exists > This behavior is broken with 2042, no longer being able to identify if a > drive/dir exists anymore. I tried to reproduce this here, and I think that it behaves exactly as it should. can you be more specific how it fails ? Tom -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel
[Freedos-kernel] Checking NUL directory/drive is broken in 2042
Was using FreeDOS 1.1 2040 kernel? previously and could check for drive or directory existence with the NUL device: If exist c:\nul echo C: existsIf exist c:\mydir\nul echo C:\mydir exists This behavior is broken with 2042, no longer being able to identify if a drive/dir exists anymore. Can the devs please add the previous behaviour with NUL drive/directory identification? Thank you -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel