Bug 314221 - composer attaches directory without confirmation if also a file is selected
Summary: composer attaches directory without confirmation if also a file is selected
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Unclassified
Component: composer (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-31 23:26 UTC by Daniel Franke
Modified: 2013-02-01 07:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Franke 2013-01-31 23:26:40 UTC
Ubuntu 12.04, Kontact/KMail 4.8.5

In the "Attach File" dialog: I accidentally selected a folder (gigabytes of data, thousands of files) plus one extra file via [CTRL] and pressed "Attach". 

If only the folder is selected, a confirmation dialog pops up: "do you reallly want to attach this directory: ..., yes/no". Fair enough.

With an additional file besides the directory, or with two directories, this dialog does not appear and the directory/directories are attached without further confirmation. In above case the kmail GUI froze while trying to pack ~5GB into a mail attachment. The only way to get it back was to kill kontact and start over.

It might be good to (1) always show the confirmation dialog for every ddirectory that should be attached and (2) have a second confirmation dialog once a (configurable?) attachment limit is reached, say 10MB by default, confirm that really more files should be attached. And (3) maybe do the collecting/packing in a background worker thread instead of a GUI thread?


Reproducible: Always
Comment 1 Laurent Montel 2013-02-01 06:52:26 UTC
I confirm it.
Will fix soon.
Comment 2 Laurent Montel 2013-02-01 07:01:14 UTC
Git commit 66f74360a320177e4ac1c6d61a3d1185d4daf530 by Montel Laurent.
Committed on 01/02/2013 at 08:00.
Pushed by mlaurent into branch 'KDE/4.10'.

Fix Bug 314221 - composer attaches directory without confirmation if

also a file is selected
FIXED-IN: 4.10.1

M  +11   -16   messagecomposer/attachmentcontrollerbase.cpp

http://commits.kde.org/kdepim/66f74360a320177e4ac1c6d61a3d1185d4daf530