It always takes the temp file code path since validateFileName returns true for valid file names and the check for that is wrong.
But even then for e.g. a zip file it choses the correct extension but shell execute fails with error 5, which should be permission denied, that confuses me a bit.
[10636] org.kde.pim.mimetreeparser.core: Wrote attachment to file: "C:/Users/Andre Heinecke/AppData/Local/Temp/kleopatraepYeoZ.zip"
[10636] ShellExecute 'file://c/Users/Andre Heinecke/AppData/Local/Temp/kleopatraepYeoZ.zip' failed (error 5).