Browse Source

Improve reading of rc file

 + More accurate function to read sexp from file, since newline at end
 of file don't lead to error.
Leo 8 years ago
parent
commit
90b0e5e843
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/rc.ml

+ 1 - 2
src/rc.ml

@@ -119,8 +119,7 @@ let rec get_basic rc_name =
   | `No -> create_basic rc_name; get_basic rc_name
   | `Unknown -> failwith "Error reading configuration file";
   | `Yes ->  (* Try to read, if there is an error, reset file *)
-    In_channel.read_all rc_name
-    |> Sexp.of_string
+    Sexp.load_sexp rc_name
     |> basic_rc_of_sexp
 ;;