Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000159OCaml~DO NOT USE (was: OCaml general)public2000-07-11 17:402000-07-25 18:29
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000159: Filename under Windows
DescriptionI am using ocaml-3.00 under Windows. According to the documentation
for the Filename module, dirname and basename should satisfy the
following property:

      concat (dirname name) (basename name)
      returns a file name which is equivalent to name.

But:

       dirname "c:/windows" = "c:",
       basename "c:/" = "windows"
       and "c:windows" is a relative pathname to the file windows in
         the current directory (provided it is on the c: drive)

Similarly:

       dirname "c:/" = "c:",
       basename "c:/" = ""
       and "c:" is the current directory, not "c:/"

(It doesn't matter whether / or \ is used, the results are the same.)


-Trevor

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000419)
administrator (administrator)
2000-07-25 18:15

Hi Trevor,

> I am using ocaml-3.00 under Windows. According to the documentation
> for the Filename module, dirname and basename should satisfy the
> following property:
> concat (dirname name) (basename name)
> returns a file name which is equivalent to name.
> But:
>
> dirname "c:/windows" = "c:",
> basename "c:/" = "windows"
> and "c:windows" is a relative pathname to the file windows in
> the current directory (provided it is on the c: drive)

Well spotted. I just fixed Filename.dirname so that it doesn't strip
the "/" or "\" immediately following a drive specification.

Cheers,

- Xavier

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

Fixed 2000-07-25 by Xavier

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker