Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000160OCamlOCaml generalpublic2000-07-11 17:452000-07-25 18:29
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000160: Unix.stat under Windows
DescriptionPerhaps this is not a bug. However, it's something I tripped over.

Unix.stat is behaving with different conventions under Windows and
Unix.

For example, in Windows, Unix.stat on "c:\\windows\\" and
"c:/windows/" will always fail, while Unix.stat on "c:/windows" or
"c:\\windows" will succeed.

In contrast, under Solaris Unix.stat will succeed on both "/usr"
and "/usr/".

More confusing: in Windows Unix.stat will succeed with "/windows" but
fail with "/windows/".

Finally, in Windows Unix.stat on "c:\\" and "c:/" will succeed, and
Unix.stat on "c:" will fail. (In fact c: refers to the current
directory).


-Trevor

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002137)
administrator (administrator)
2000-07-25 18:25

> Perhaps this is not a bug. However, it's something I tripped over.
> Unix.stat is behaving with different conventions under Windows and
> Unix.
> For example, in Windows, Unix.stat on "c:\\windows\\" and
> "c:/windows/" will always fail, while Unix.stat on "c:/windows" or
> "c:\\windows" will succeed.
>
> In contrast, under Solaris Unix.stat will succeed on both "/usr"
> and "/usr/".
>
> More confusing: in Windows Unix.stat will succeed with "/windows" but
> fail with "/windows/".
>
> Finally, in Windows Unix.stat on "c:\\" and "c:/" will succeed, and
> Unix.stat on "c:" will fail. (In fact c: refers to the current
> directory).

Right. Unix.stat is just a wrapper around the C library stat()
function, which (in Visual C++ 6.0) is implemented using
FindFirstFile(). The latter is documented as not accepting trailing
slashes, and not accepting a root directory such as C:\. The stat()
wrapper in the C library special-cases root directories, but not
trailing slashes...

- Xavier

(0002138)
administrator (administrator)
2000-07-25 18:29

Windows lossage.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker