X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=daemon%2Fdaemon.ml;h=bc4f51a2f1177e5be2692a233d7f2b850f9a55bc;hp=c04bfcbac06cce362b20ac81cace23d6c30ae2e0;hb=8582d10e7b131ffbfe1d92352e7df39230ce1124;hpb=cb8bbd5621366d5adc82e59bff62bd8cc50d8e85 diff --git a/daemon/daemon.ml b/daemon/daemon.ml index c04bfcb..bc4f51a 100644 --- a/daemon/daemon.ml +++ b/daemon/daemon.ml @@ -292,14 +292,11 @@ and proc_whisper_variables vars = (* Reload the jobs file(s). *) and reload_files () = - (* Get dir/*.cmo *) + (* Get dir/*.cmo (bytecode) or dir/*.cmxs (native code) *) + let suffix = if not Dynlink.is_native then ".cmo" else ".cmxs" in let dir = !jobsdir in let files = Array.to_list (Sys.readdir dir) in - let files = List.filter ( - fun file -> - let n = String.length file in - n >= 5 && String.sub file (n-4) 4 = ".cmo" - ) files in + let files = List.filter (fun file -> string_endswith file suffix) files in let files = List.map (fun file -> dir // file) files in let files = List.sort compare files in