;;
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 := [];
;;
user_tbl := (uid,(pw,None))::!user_tbl;
serialize ()
;;
+
+let reset () =
+ user_tbl := [];
+ session_tbl := [];
+ MatitaFilesystem.reset_lib ();
+ serialize ();
+;;