You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 160 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
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).
-Trevor
The text was updated successfully, but these errors were encountered:
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...
Original bug ID: 160
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
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).
-Trevor
The text was updated successfully, but these errors were encountered: