diff options
author | Simon McVittie <smcv@debian.org> | 2024-03-19 02:13:52 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2024-03-26 10:47:15 +0000 |
commit | 92a5b2ae09149b4759b254ebea81e862554c28d8 (patch) | |
tree | 858ed29ec638bbc9260c1384f2cf66dac5917cc7 | |
parent | 7b2f2d08a32fb8871c904e86204986cb286b5442 (diff) |
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.
Forwarded: https://gitlab.gnome.org/GNOME/vala/-/merge_requests/379
Applied-upstream: 0.56.17, commit:5e963bf138bcac53c8a8cae4fa9053cfbf13a714
Gbp-Pq: Name vala-Correctly-use-Path.build_path.patch
-rw-r--r-- | vala/valacodecontext.vala | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |