Commit a391035b authored by Laurent Montel's avatar Laurent Montel 😁

Don't create link when path is empty

parent 004eec76
......@@ -55,6 +55,9 @@ PartNodeBodyPart::PartNodeBodyPart(ObjectTreeParser *otp, ProcessResult *result,
QString PartNodeBodyPart::makeLink(const QString &path) const
{
// FIXME: use a PRNG for the first arg, instead of a serial number
if (path.isEmpty()) {
return {};
}
return QStringLiteral("x-kmail:/bodypart/%1/%2/%3")
.arg(serial++).arg(mContent->index().toString())
.arg(QString::fromLatin1(QUrl::toPercentEncoding(path, "/")));
......
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