From: Rico Tzschichholz Date: Tue, 12 Jan 2021 09:24:13 +0000 (+0100) Subject: vala: Improve detection of duplicate package source files X-Git-Tag: 0.51.1~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=382a2961c1380a52f0255e17665b03b19673b3d3;p=thirdparty%2Fvala.git vala: Improve detection of duplicate package source files --- diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala index 510225e15..d2e550f03 100644 --- a/vala/valacodecontext.vala +++ b/vala/valacodecontext.vala @@ -395,7 +395,13 @@ public class Vala.CodeContext { add_package (pkg); - add_source_file (new SourceFile (this, SourceFileType.PACKAGE, path)); + var rpath = realpath (path); + var source_file = new SourceFile (this, SourceFileType.PACKAGE, path); + + add_source_file (source_file); + if (rpath != path) { + source_files_map.set (rpath, source_file); + } if (verbose_mode) { stdout.printf ("Loaded package `%s'\n", path);