summaryrefslogtreecommitdiff
path: root/vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2010-08-20 15:30:50 +0200
committerJürg Billeter <j@bitron.ch>2010-08-20 15:32:09 +0200
commit2bf8950fae484f09aa45e78ac22e63398f8192fc (patch)
treed1472703e55f8237264dc5719333095d7efd37cf /vala
parent60de36cdd9a61cf12ebaf886686af38f11c42d31 (diff)
downloadvala-2bf8950fae484f09aa45e78ac22e63398f8192fc.tar.gz
Use relative path as specified on the command-line in error messages
Fixes bug 591683.
Diffstat (limited to 'vala')
-rw-r--r--vala/valasourcefile.vala17
1 files changed, 14 insertions, 3 deletions
diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala
index cff51b703..464c93e2d 100644
--- a/vala/valasourcefile.vala
+++ b/vala/valasourcefile.vala
@@ -31,7 +31,12 @@ public class Vala.SourceFile {
*/
public string filename { get; set; }
-
+ public string? relative_filename {
+ set {
+ this._relative_filename = value;
+ }
+ }
+
/**
* Specifies whether this file is a VAPI package file.
*/
@@ -67,7 +72,9 @@ public class Vala.SourceFile {
public List<UsingDirective> current_using_directives { get; set; default = new ArrayList<UsingDirective> (); }
private List<CodeNode> nodes = new ArrayList<CodeNode> ();
-
+
+ string? _relative_filename;
+
private string csource_filename = null;
private string cinclude_filename = null;
@@ -185,7 +192,11 @@ public class Vala.SourceFile {
}
public string get_relative_filename () {
- return get_subdir () + Path.get_basename (filename);
+ if (_relative_filename != null) {
+ return _relative_filename;
+ } else {
+ return Path.get_basename (filename);
+ }
}
/**