From: Simon McVittie Date: Tue, 19 Mar 2024 02:13:52 +0000 (+0000) Subject: vala: Correctly use Path.build_path() X-Git-Tag: 0.56.17~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a2c210f4d526c098a10cbf700280d480ffbb385;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 8461403c6..59ef28c8b 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; }