Commit e046d869 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Check if version is empty before concatenating version

The version is not mandatory and often empty. In that
case we do not want to end up with a "-" at the end of the
string.
parent 1658c801
......@@ -606,7 +606,9 @@ QStringList Installation::installDownloadedFileAndUncompress(const KNSCore::Entr
if (customName) {
// Otherwise name can be interpreted as path
installfile = entry.name().remove(QLatin1Char('/'));
installfile += QLatin1Char('-') + entry.version();
if (!entry.version().isEmpty()) {
installfile += QLatin1Char('-') + entry.version();
}
if (!ext.isEmpty()) {
installfile += QLatin1Char('.') + ext;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment