[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-bugs] [bug #19818] Share priorities do not work on MinGW

From: spiralvoice
Subject: [Mldonkey-bugs] [bug #19818] Share priorities do not work on MinGW
Date: Mon, 07 Jan 2008 00:08:23 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20071127 Firefox/

Update of bug #19818 (project mldonkey):

                  Status:                    None => Ready For Test         
                 Release:                   2.8.5 => 2.9.2                  


Follow-up Comment #2:

First of all, this is really a bug, code was introduced to in
September 2002...

Your fix is correct, but it solves only the symptom, not the reason for this

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 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)

Additional Item Attachment:

File name: share_prio_mingw.patch         Size:0 KB


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]