]> matita.cs.unibo.it Git - helm.git/blobdiff - matitaB/matita/matitaAuthentication.ml
Changed redirect behaviour of the daemon (incompatibility with browsers
[helm.git] / matitaB / matita / matitaAuthentication.ml
index a183bc42033d8ed14ef487c86a79e68043ba978b..77aeed15f599c24f73d476b71e81aad45cc593d3 100644 (file)
@@ -104,9 +104,13 @@ 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 := []; serialize());
   (* old_sessions are now invalid *)
   session_tbl := [];
 ;;