/[mldonkey]/mldonkey/src/utils/cdk/unix2.ml
ViewVC logotype

Diff of /mldonkey/src/utils/cdk/unix2.ml

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

revision 1.13 by spiralvoice, Mon Jun 20 18:56:44 2005 UTC revision 1.14 by spiralvoice, Fri Aug 26 21:12:23 2005 UTC
# Line 64  let rec safe_mkdir dir = Line 64  let rec safe_mkdir dir =
64      begin try      begin try
65        let dir = opendir dir in ()        let dir = opendir dir in ()
66        with        with
67          Unix.Unix_error (EACCES, _, _) -> failwith (Printf.sprintf "access denied for directory %s" dir)          Unix.Unix_error (EACCES, _, _) -> lprintf "access denied for directory %s" dir; exit 73
68        | Unix.Unix_error (ENOENT, _, _) -> failwith (Printf.sprintf "directory %s not found, orphaned link?" dir)        | Unix.Unix_error (ENOENT, _, _) -> lprintf "directory %s not found, orphaned link?" dir; exit 73
69        | e -> failwith (Printf.sprintf "error %s for directory %s" (Printexc2.to_string e) dir)        | e -> lprintf "error %s for directory %s" (Printexc2.to_string e) dir; exit 73
70      end      end
71    else begin    else begin
72        let predir = Filename.dirname dir in        let predir = Filename.dirname dir in
# Line 157  let can_write_to_directory dirname = Line 157  let can_write_to_directory dirname =
157      (try Sys.remove temp_file with _ -> ())      (try Sys.remove temp_file with _ -> ())
158    with    with
159      Sys_error s when s = temp_file ^ ": " ^ (Unix.error_message Unix.EACCES) ->      Sys_error s when s = temp_file ^ ": " ^ (Unix.error_message Unix.EACCES) ->
160        failwith (Printf.sprintf "can not create files in directory %s, check rights..." dirname)        lprintf "can not create files in directory %s, check rights..." dirname; exit 73
161    | Sys_error s -> failwith (Printf.sprintf "%s for directory %s" s dirname)    | Sys_error s -> lprintf "%s for directory %s" s dirname; exit 73
162    | e -> failwith (Printf.sprintf "%s for directory %s" (Printexc2.to_string e) dirname)    | e -> lprintf "%s for directory %s" (Printexc2.to_string e) dirname; exit 73

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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