Bug 121130

Summary: Paste as attachment does not work for multiple files in KMail
Product: [Applications] kmail Reporter: A T Somers <andre>
Component: composerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: peter.mueller_1955
Priority: NOR    
Version: 1.9   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description A T Somers 2006-02-01 08:16:42 UTC
Version:           1.9 (using KDE 3.5.0, Gentoo)
Compiler:          gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
OS:                Linux (i686) release 2.6.14-gentoo-r4

When selecting more than one file in Konqueror, copying them (CTRL-C) and trying to attach them "paste" in the composer window for an email using "Paste as Attachment", an error pops up complaining about the non-existence of the URL. The error shows both files, and I guess the URLs got combined somehow?
Pasting a single file at a time works.

I expected to be able to paste more than one file as attachment in one go.
Comment 1 Philip Rodrigues 2006-02-01 16:20:51 UTC
Confirmed with r496940. Konq copies the URLs as "file:///path/to/file1 file:///path/to/file2", which on its own isn't a file that exists. I don't know how kmail should handle this. Perhaps the fix needs to happen in konq?
Comment 2 Philip Rodrigues 2006-08-03 20:21:07 UTC
*** Bug 131757 has been marked as a duplicate of this bug. ***
Comment 3 Philip Rodrigues 2006-08-03 20:21:45 UTC
A note from Stefan Gehn in bug 131757:

Developer note: 
 The problem is in KMComposeWin::slotPasteAsAttachment() which calls KURL constructor with the clipboard contents. Checking for \n and splitting the text accordingly could help but I'm not sure if that's the best thing to do. Also I'm puzzled how url.isValid() can return true for an url that contains a newline and another protocol definition in the middle of the string. 
Comment 4 A T Somers 2006-10-28 19:20:55 UTC
Still the case with 3.5.5
Comment 5 Bram Schoenmakers 2007-03-10 21:45:24 UTC
Please note that drag 'n drop for multiple files still works.
Comment 6 Edwin Schepers 2007-09-12 20:31:45 UTC
SVN commit 711755 by eschepers:

menuitem 'Paste as attachment' now works for multiple files
BUG: 121130


 M  +7 -3      kmcomposewin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=711755
Comment 7 A T Somers 2007-09-13 09:24:24 UTC
Excellent! Thanks a lot! 
Comment 8 p 2007-11-11 06:16:58 UTC
Just installed KDE 3.5.8 on Suse 10.2. Still the same issue. With which release should we see the bug fix?
Comment 9 Jonathan Marten 2007-11-12 12:41:36 UTC
Regarding comment #8: In KDE 4, unless someone backports the fix to 3.5 branch.