From 51c75ab1af61ab608c7891ad0e062fd69355ea8b Mon Sep 17 00:00:00 2001 From: ยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค Date: Wed, 31 Dec 2025 08:42:05 +0000 Subject: silo: if failed to link, try to set up silo + retry link --- lib/input_foreman.ml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/input_foreman.ml b/lib/input_foreman.ml index 02020a1..ed6374a 100644 --- a/lib/input_foreman.ml +++ b/lib/input_foreman.ml @@ -195,7 +195,15 @@ let make_silo_link ~name ~link_to = let path = Eio.Path.(Working_directory.(get () / silo_dir) / name) in Logs.info (fun m -> m "Silo: filling with %s โ†ฆ %a โ€ฆ" name Eio.Path.pp path); unlink_or_rm_silo ~at: (`Path path); - Eio.Path.symlink path ~link_to + try + Eio.Path.symlink path ~link_to + with + | Eio.(Exn.Io (Fs.E (Fs.Not_found _), _)) -> + Logs.debug (fun m -> m "Silo: failed to link %s; will try to set up the silo & retry link โ€ฆ" name); + Working_directory.set_up_silo (); + Eio.Path.symlink path ~link_to + | exn -> + raise exn let clean_unlisted_from_silo () = Logs.debug (fun m -> m "Silo: cleaning unlisted โ€ฆ"); -- cgit v1.2.3