From 5e963bf138bcac53c8a8cae4fa9053cfbf13a714 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 19 Mar 2024 02:13:52 +0000 Subject: [PATCH] vala: Correctly use Path.build_path() The first argument to Path.build_path() is a separator, and for it to be practically useful, at least two subsequent arguments are needed. Also to find GIR XML in /usr/share we should make the second argument be an absolute path. --- vala/valacodecontext.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala index cf8119759..7c1a9052e 100644 --- a/vala/valacodecontext.vala +++ b/vala/valacodecontext.vala @@ -726,13 +726,13 @@ public class Vala.CodeContext { } // Search $GI_GIRDIR set by user or retrieved from gobject-introspection-1.0.pc - path = Path.build_path (Config.GI_GIRDIR, girname); + path = Path.build_path ("/", Config.GI_GIRDIR, girname); if (FileUtils.test (path, FileTest.EXISTS | FileTest.IS_REGULAR)) { return path; } // Search /usr/share - path = Path.build_path ("/", "usr", "share", GIR_SUFFIX, girname); + path = Path.build_path ("/", "/usr", "share", GIR_SUFFIX, girname); if (FileUtils.test (path, FileTest.EXISTS | FileTest.IS_REGULAR)) { return path; } -- 2.47.2