diff options
author | Jürg Billeter <j@bitron.ch> | 2010-08-20 15:30:50 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-08-20 15:32:09 +0200 |
commit | 2bf8950fae484f09aa45e78ac22e63398f8192fc (patch) | |
tree | d1472703e55f8237264dc5719333095d7efd37cf /compiler | |
parent | 60de36cdd9a61cf12ebaf886686af38f11c42d31 (diff) | |
download | vala-2bf8950fae484f09aa45e78ac22e63398f8192fc.tar.gz |
Use relative path as specified on the command-line in error messages
Fixes bug 591683.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/valacompiler.vala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala index af22abd61..54c93eb9e 100644 --- a/compiler/valacompiler.vala +++ b/compiler/valacompiler.vala @@ -351,6 +351,7 @@ class Vala.Compiler { var rpath = realpath (source); if (run_output || source.has_suffix (".vala") || source.has_suffix (".gs")) { var source_file = new SourceFile (context, rpath); + source_file.relative_filename = source; if (context.profile == Profile.POSIX) { // import the Posix namespace by default (namespace of backend-specific standard library) @@ -371,7 +372,10 @@ class Vala.Compiler { context.add_source_file (source_file); } else if (source.has_suffix (".vapi") || source.has_suffix (".gir")) { - context.add_source_file (new SourceFile (context, rpath, true)); + var source_file = new SourceFile (context, rpath, true); + source_file.relative_filename = source; + + context.add_source_file (source_file); } else if (source.has_suffix (".c")) { context.add_c_source_file (rpath); has_c_files = true; |