From ca82985462351ea787d62236e05b962b06dfe267 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 10 Oct 2014 01:18:58 +0300 Subject: [PATCH] Don't generate filenames with double dash for versionless packages --- source/sourcearchivecomponent.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/sourcearchivecomponent.cpp b/source/sourcearchivecomponent.cpp index 6dc5fe6..3304e6b 100644 --- a/source/sourcearchivecomponent.cpp +++ b/source/sourcearchivecomponent.cpp @@ -35,7 +35,10 @@ void SourceArchiveComponent::create_targets() const files.push_back(i->second); const Toolchain &toolchain = builder.get_toolchain(); - string archive_name = package.get_name()+"-"+package.get_version()+"-source"; + string archive_name = package.get_name(); + if(!package.get_version().empty()) + archive_name += "-"+package.get_version(); + archive_name += "-source"; Target *result = toolchain.get_tool("TAR").create_target(files, archive_name); build_graph.get_target("archives")->add_dependency(*result); } -- 2.45.2