[Freedos-kernel] Checking NUL directory/drive is broken in 2042

2018-10-30 Thread Tom Ehlert


   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

2017-01-26 Thread Tom Ehlert

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

2017-01-25 Thread Nando Eva
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