Mail Archives: djgpp/2001/06/08/03:36:02
> From: "Alex Oleynikov" <alex AT compuweigh DOT com>
> Date: Thu, 7 Jun 2001 16:39:43 -0400
>
> Call to _chmod( ) fails with the following results:
> R.X.AX = 3
> R.X.AX_HI = 0x2D
> errno = 22
Okay, AX = 3 is "Path not found". This means that PTS-DOS thinks the
directy part of the file name, "foo/../", is invalid or points to a
non-existing directory.
This is strange; I suspect some bug in PTS-DOS's file-name
canonicalization code. What does the library function _truename
return if you pass it "foo/../nametest.exe" as an argument?
Also, is it true that ``access("foo/../nametest.exe", 0)'' fails, but
``access("nametest.exe", 0)'' succeeds on PTS-DOS?
What happens if you use backslashes instead of forward slashes in
these file names?
> Call to findfirst( ) fails with the following results:
> R.X.AX = 3
> R.X.AX_HI = 0x2D
> errno = 22
The same AX = 3.
> Actually, the findfirst( ) is not called from this place, because
> fixed_path[] contains "d:/cd4000/probe.tc/nametest.exe"
> ( Why? Isn't it should be "d:/cd4000/probe.tc/foo/nametest.exe" ? )
No. The program nametest.exe is not in the foo subdirectory, it's in
d:/cd4000/probe.tc directory, right? The file name
"foo/../nametest.exe" says go down into foo, then go up again, so it
ends up in the same directory where it started.
Does `access' work at all on PTS-DOS? Can you make it work for any
file name at all, with or without leading directories, with forward or
backslashes--in any way?
- Raw text -