From: Simon McVittie Date: Tue, 19 Mar 2024 02:13:52 +0000 (+0000) Subject: vala: Correctly use Path.build_path() X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=5e963bf138bcac53c8a8cae4fa9053cfbf13a714;p=thirdparty%2Fvala.git 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. --- 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; }