/[mldonkey]/mldonkey/src/daemon/common/commonOptions.ml
ViewVC logotype

Diff of /mldonkey/src/daemon/common/commonOptions.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.91 by spiralvoice, Tue Sep 20 22:43:04 2005 UTC revision 1.92 by spiralvoice, Thu Oct 6 10:21:07 2005 UTC
# Line 29  open Unix Line 29  open Unix
29  let bin_dir = Filename.dirname Sys.argv.(0)  let bin_dir = Filename.dirname Sys.argv.(0)
30    
31  let hidden_dir_prefix =  let hidden_dir_prefix =
32    if Autoconf.system = "windows" then "" else "."    if Autoconf.windows then "" else "."
33    
34  let config_dir_basename = hidden_dir_prefix ^ "mldonkey"  let config_dir_basename = hidden_dir_prefix ^ "mldonkey"
35    
36  let home_dir =  let home_dir =
37    match Autoconf.system with    match Autoconf.system with
38    | "windows" -> "."    | "cygwin"
39      | "mingw" -> "."
40    | _ -> Filename.concat (try Sys.getenv "HOME" with _ -> ".") config_dir_basename    | _ -> Filename.concat (try Sys.getenv "HOME" with _ -> ".") config_dir_basename
41    
42  let installer_ini = create_options_file (Filename.concat home_dir  let installer_ini = create_options_file (Filename.concat home_dir
# Line 85  let file_basedir = Line 86  let file_basedir =
86    if Sys.file_exists (Filename.concat (Sys.getcwd ()) "downloads.ini") then    if Sys.file_exists (Filename.concat (Sys.getcwd ()) "downloads.ini") then
87      "."      "."
88    else    else
89      if Autoconf.system = "windows" && file_basedir_pre <> home_dir then      if Autoconf.windows && file_basedir_pre <> home_dir then
90        match String2.split file_basedir_pre ':' with        match String2.split file_basedir_pre ':' with
91        | drive :: directory :: _ ->        | drive :: directory :: _ ->
92            Unix.chdir (drive ^ ":\\");            Unix.chdir (drive ^ ":\\");
# Line 1469  let _ = Line 1470  let _ =
1470              end;              end;
1471            let oc = open_out_gen [Open_creat; Open_wronly; Open_append] 0o644 !!log_file in            let oc = open_out_gen [Open_creat; Open_wronly; Open_append] 0o644 !!log_file in
1472            lprintf_to_file := true;            lprintf_to_file := true;
1473            if Autoconf.system = "windows" then lprintf "%s" win_message;            if Autoconf.system = "cygwin" then lprintf "%s" win_message;
1474            lprintf_nl "Logging in %s" ( Filename.concat file_basedir !!log_file);            lprintf_nl "Logging in %s" ( Filename.concat file_basedir !!log_file);
1475            log_to_file oc;            log_to_file oc;
1476            lprintf_nl "Started logging..."            lprintf_nl "Started logging..."

Legend:
Removed from v.1.91  
changed lines
  Added in v.1.92

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26