diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/wixl/builder.vala | 7 | ||||
-rw-r--r-- | tools/wixl/wix.vala | 13 |
2 files changed, 13 insertions, 7 deletions
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala index 22233fe..9a6e738 100644 --- a/tools/wixl/builder.vala +++ b/tools/wixl/builder.vala @@ -675,12 +675,7 @@ namespace Wixl { file.DiskId = file.DiskId ?? "1"; return_if_fail (file.DiskId == "1"); - var name = file.Id; - if (file.Name != null) - name = file.Name; - else if (file.Source != null) - name = Path.get_basename (file.Source); - + var name = file.path_name (); var source = file.Source ?? name; var comp = file.parent as WixComponent; FileInfo info; diff --git a/tools/wixl/wix.vala b/tools/wixl/wix.vala index 5e290fb..6ccccf1 100644 --- a/tools/wixl/wix.vala +++ b/tools/wixl/wix.vala @@ -419,7 +419,7 @@ namespace Wixl { public File file; public override string path_name () throws GLib.Error { - return Name; + return Name ?? Path.get_basename (Source); } public override void accept (WixNodeVisitor visitor) throws GLib.Error { @@ -1093,6 +1093,17 @@ namespace Wixl { base.accept (visitor); visitor.visit_directory (this); } + + public string path_name () { + return Name ?? Id; + } + + public override string full_path (WixResolver r) throws GLib.Error { + if (parent != null && (parent is WixDirectory || parent is WixDirectoryRef)) + return parent.full_path (r) + "/" + path_name (); + else + return path_name (); + } } public class WixElementRef<G>: WixElement { |