From dc21a7ae8ac838b0967db8d65ca30724ae556a47 Mon Sep 17 00:00:00 2001 From: Wilmer Ricciotti Date: Tue, 6 Sep 2011 12:28:13 +0000 Subject: [PATCH] When the user db is not found, matitaweb now creates a new one. --- matitaB/matita/matitaAuthentication.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 := []; ;; -- 2.39.2