]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Improve detection of duplicate package source files
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 12 Jan 2021 09:24:13 +0000 (10:24 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 12 Jan 2021 09:37:00 +0000 (10:37 +0100)
vala/valacodecontext.vala

index 510225e1598402e4490c438d709a0ded847984d0..d2e550f03e9ce39897e38b59cadb0027a517103c 100644 (file)
@@ -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);