Mail Archives: djgpp-workers/1997/08/26/09:55:00
Here's a nasty one: `rename' fails for directories on LFN platforms. You
can try "mv -v xyzzy abcdf" where xyzzy is a directory and abcdf doesn't
exist, and see it fail when LFN=y, succeed when LFN=n.
It turns out this is due to `_truename' (so what else is new?). Under
LFN, it calls Int 21h/AX=7160h/CX=2. But this call is documented to fail
when the named file does not exist, because it might need to return a
long name when you call it with a short name. And `rename' needs to call
`_truename' so it won't rename foo to foo/bar.
The following patch makes `_truename' try once more but with CX=0 if the
call with CX=2 fails. This does not validate the file and so works in
these cases, and the problem of getting the long name doesn't exist for a
non-existing file.
I've uploaded to DJ's /incoming a version of fil316b.zip linked with the
patched `_truename', it should be on SimTel.NET shortly. If you work on
Windows 95, you will probably want it.
- Raw text -