[Top][All Lists]

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

[Mldonkey-tasks] [task #4310] Let MLDonkey create its data in $HOME/.mld

From: spiralvoice
Subject: [Mldonkey-tasks] [task #4310] Let MLDonkey create its data in $HOME/.mldonkey be default
Date: Fri, 8 Jul 2005 12:02:39 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.8) Gecko/20050519 Firefox/1.0.4


                 Summary: Let MLDonkey create its data in $HOME/.mldonkey be
                 Project: mldonkey, a multi-networks file-sharing client
            Submitted by: spiralvoice
            Submitted on: Sam 25.06.2005 um 11:35
                Category: Core
                Priority: 3 - Low
                  Status: None
             Assigned to: None
             Open/Closed: Open
         Should Start On: Sam 25.06.2005 um 00:00
   Should be Finished on: Sam 25.06.2005 um 00:00



This is a feature request which would be released in version 2.6.
As this is a major change in comparison to current behaviour
users need to have attention for this change so a new minor
release number would be adequate.

Coding this would be easy in

          let s = Sys.getenv "MLDONKEY_DIR" in
          if s = "" then "." else s
        with _ ->
      ), home_dir

"else s" should be changed to something like this:

else match Autoconf.system with
    "windows" -> Sys.getenv "USERPROFILE" ^ config_dir_basename (*to be
  | "unix" "freebsd" "openbsd" "solaris" -> Sys.getenv "HOME" ^
  | "darwin" -> () (*don´t know, any help?*)
  | _ -> "."

This code is only an example.
config_dir_basename means this:

let hidden_dir_prefix =
  if Autoconf.system = "windows" then "" else "."

let config_dir_basename = hidden_dir_prefix ^ "mldonkey"

This is necessary as directories on Windows can´t start with "."

Other clients like aMule and eDonkey already are working like
this so MLDonkey would be more compatible. The MLDonkey Debian
package also puts MLDonkey files and dirs into $HOME/.mldonkey


Follow-up Comments:

Date: Don 07.07.2005 um 22:14       By: Anonymous
Works as a charm here on MaxOSX. Nice work.

Date: Mit 06.07.2005 um 22:28       By: spiralvoice <spiralvoice>
Updated the patch, please test it
- incorporated MacOSX into the new mechanism, thanks to White_FrosT
- some internal code cleaning, replaced config_dir with home_dir
- created some backward compatability
  if the core is started in a directory where downloads.ini exists
  the core will use this directory instead of $HOME/.mldonkey

Date: Mon 04.07.2005 um 23:02       By: Anonymous
Uhm sorry, forgot to mention: yes, the $HOME variable works (exists) on mac
osx too.

Date: Mon 04.07.2005 um 23:01       By: Anonymous
I did some testing, macosx is not recognised. So I guess it has just got to
  | "linux" | "freebsd" | "openbsd" | "solaris"| "darwin" ->
       Filename.concat (try Sys.getenv "HOME" with _ -> ".")
without the extra line for darwin.

Tested and works as intentioned.

Date: Don 30.06.2005 um 12:06       By: spiralvoice <spiralvoice>
Yeah, that would be nice. I think you can change the patch for
yourself;-) I would prefer using $HOME if it is possible.

BTW: I think Autoconf.system should be changed from "Darwin" to
"MacOSX" or something similar so it is clearer.

Date: Don 30.06.2005 um 10:29       By: Anonymous
According to and the location of the homedir of
the users is just /Users/[username]/

But in #macdev they said it should be the same at in any other unix, so you
could add darwin in that list. If you like I can test it for you, I have a
small OS/X server here.

Date: Die 28.06.2005 um 19:28       By: spiralvoice <spiralvoice>
Please test this patch, I still don´t know how to get the homedir
on MacOSX, any help?


File Attachments:

Date: Mit 06.07.2005 um 22:28  Name: homedir2.patch  Size: 14,77KB   By:



Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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