]> matita.cs.unibo.it Git - helm.git/commitdiff
create path towards dbm file
authorStefano Zacchiroli <zack@upsilon.cc>
Fri, 4 Feb 2005 09:23:27 +0000 (09:23 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Fri, 4 Feb 2005 09:23:27 +0000 (09:23 +0000)
helm/ocaml/getter/http_getter_map.ml

index 4bead0c6cb9e3a8fd0176466fb18cbf8eb1f62ba..7c411d8317fc570ae8177c2246f18b2c7b3cb44c 100644 (file)
@@ -30,7 +30,10 @@ open Http_getter_types
 
 class map dbname =
   let perm = 420 in (* permission 644 in decimal notation *)
-  let open_dbm () = Dbm.opendbm dbname [ Dbm.Dbm_rdwr; Dbm.Dbm_create ] perm in
+  let open_dbm () =
+    Http_getter_misc.mkdir ~parents:true (Filename.dirname dbname);
+    Dbm.opendbm dbname [ Dbm.Dbm_rdwr; Dbm.Dbm_create ] perm
+  in
   
   object (self)