From 11ef6b3c439367abdc168f4343ff9ca122e357e5 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Wed, 5 Nov 2025 12:00:40 +0000 Subject: [PATCH] Fix path handling when loading the plugins Filename.concat inserts a slash, so remove the leading slash from the plugins directory. Use Filename.concat consistently for all paths. Closes https://github.com/xapi-project/oxenstored/issues/22 Signed-off-by: Andrew Cooper --- oxenstored/domains.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oxenstored/domains.ml b/oxenstored/domains.ml index af3cede..c09dcb2 100644 --- a/oxenstored/domains.ml +++ b/oxenstored/domains.ml @@ -38,9 +38,9 @@ let () = (* Do not link with the plugin when being tested *) if not Testing_status.under_testing then ( let plugins_dir = - Filename.concat Paths.libexec "/ocaml/xsd_glue/xenctrl_plugin/" + Filename.concat Paths.libexec "ocaml/xsd_glue/xenctrl_plugin" in - let filepath = plugins_dir ^ "domain_getinfo_v1.cmxs" in + let filepath = Filename.concat plugins_dir "domain_getinfo_v1.cmxs" in debug "Trying to load plugin '%s'\n%!" filepath ; let list_files = Sys.readdir plugins_dir in debug "Directory listing of '%s'\n%!" plugins_dir ;