| Anonymous | Login | Signup for a new account | 2013-05-21 18:20 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0000160 | OCaml | OCaml general | public | 2000-07-11 17:45 | 2000-07-25 18:29 | |||
| Reporter | administrator | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | no change required | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0000160: Unix.stat under Windows | |||||||
| 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 | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
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 |