Skip to content

Commit 11ef6b3

Browse files
committed
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 #22 Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
1 parent bbdbfd8 commit 11ef6b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

oxenstored/domains.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ let () =
3838
(* Do not link with the plugin when being tested *)
3939
if not Testing_status.under_testing then (
4040
let plugins_dir =
41-
Filename.concat Paths.libexec "/ocaml/xsd_glue/xenctrl_plugin/"
41+
Filename.concat Paths.libexec "ocaml/xsd_glue/xenctrl_plugin"
4242
in
43-
let filepath = plugins_dir ^ "domain_getinfo_v1.cmxs" in
43+
let filepath = Filename.concat plugins_dir "domain_getinfo_v1.cmxs" in
4444
debug "Trying to load plugin '%s'\n%!" filepath ;
4545
let list_files = Sys.readdir plugins_dir in
4646
debug "Directory listing of '%s'\n%!" plugins_dir ;

0 commit comments

Comments
 (0)