Skip to content
Snippets Groups Projects
Commit 47d804c3 authored by Laurent Montel's avatar Laurent Montel
Browse files

Replace \n by '_' in filename. otherwise mail will be broken

Bug found by David
parent 9cb79992
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,7 @@ void AttachmentFromUrlJob::Private::transferJobResult(KJob *job)
qCDebug(MESSAGECORE_LOG) << "Mimetype is" << mimeTypeName;
QString fileName = q->url().fileName();
fileName.replace(QLatin1Char('\n'), QLatin1Char('_'));
if (fileName.isEmpty()) {
QMimeDatabase db;
const auto mimeType = db.mimeTypeForName(mimeTypeName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment