Mon 07 Jan 2008 12:08:23 AM UTC, comment #2:
First of all, this is really a bug, code was introduced to commonShared.ml in September 2002...
Your fix is correct, but it solves only the symptom, not the reason for this bug.
impl.impl_shared_codedname is filled in function commonShared.new_shared
let codedname = Filename.concat dirname filename in
Example: dirname = "shared2", filename "some_file.txt"
Result: on Unix: "shared2/some_file.txt", on MinGW: "shared2\\some_file.txt"
Its a bad idea to use hard-coded seperators, like
String.index codedname '/'
in commonShared.ml anyway, but as it dates back to a time
where MinGW support was not present (it was started in Dec 2002)
I guess no one thought about it. It assumed "/" as seperator,
but this code fails on MinGW due to usage of "\\" as seperator
in Ocaml´s Filename.concat function.
Ocaml has a special function to seperate Filename.concat strings
using Filename.dirname while taking care of the correct seperator.
Please try the attached patch. It works for me.
In HTML, upstats you can see the patch working when you look
at the slot column.
(file #14758)
|