From: Wilmer Ricciotti Date: Tue, 6 Sep 2011 12:28:13 +0000 (+0000) Subject: When the user db is not found, matitaweb now creates a new one. X-Git-Tag: make_still_working~2316 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=dc21a7ae8ac838b0967db8d65ca30724ae556a47;p=helm.git When the user db is not found, matitaweb now creates a new one. --- diff --git a/matitaB/matita/matitaAuthentication.ml b/matitaB/matita/matitaAuthentication.ml index a183bc420..d51eb2e4f 100644 --- a/matitaB/matita/matitaAuthentication.ml +++ b/matitaB/matita/matitaAuthentication.ml @@ -104,9 +104,12 @@ let serialize () = ;; let deserialize () = - let utbl_ch = open_in (config_path () ^ "/usertable.dump") in - user_tbl := Marshal.from_channel utbl_ch; - close_in utbl_ch; + (try + let utbl_ch = open_in (config_path () ^ "/usertable.dump") in + user_tbl := Marshal.from_channel utbl_ch; + close_in utbl_ch; + with + | Sys_error _ -> user_tbl := []); (* old_sessions are now invalid *) session_tbl := []; ;;