From 88a306ec18f87f7ce3f7bfbb57db1520f90af356 Mon Sep 17 00:00:00 2001 From: erwan <erwan.jahier@univ-grenoble-alpes.fr> Date: Tue, 27 Jul 2021 10:10:21 +0200 Subject: [PATCH] fix: allow dot files to start with a relative path --- lib/sasacore/seed.ml | 3 ++- lib/sasacore/simuState.ml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/sasacore/seed.ml b/lib/sasacore/seed.ml index e3857114..e99d63cf 100644 --- a/lib/sasacore/seed.ml +++ b/lib/sasacore/seed.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 21/05/2021 (at 17:18) by Erwan Jahier> *) +(* Time-stamp: <modified the 27/07/2021 (at 09:20) by Erwan Jahier> *) let seed = ref None let replay_seed = ref false @@ -32,6 +32,7 @@ let reset () = seed := None let rec (get : string -> int) = fun label -> + let label = Filename.basename label in match !seed with | Some i -> i | None -> diff --git a/lib/sasacore/simuState.ml b/lib/sasacore/simuState.ml index 18e77b9f..befccd01 100644 --- a/lib/sasacore/simuState.ml +++ b/lib/sasacore/simuState.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 23/07/2021 (at 11:19) by Erwan Jahier> *) +(* Time-stamp: <modified the 27/07/2021 (at 09:19) by Erwan Jahier> *) open Register @@ -207,6 +207,7 @@ let (make : bool -> string array -> 'v t) = let cmxs = (Filename.chop_extension dot_file) ^ ".cmxs" in if args.gen_register then ( let base = Filename.chop_extension dot_file in + let base = Filename.basename base in let base = Str.global_replace (Str.regexp "\\.") "" base in let ml_register_file = base ^ ".ml" in let ml_state_file = "state.ml" in -- GitLab