Bug 75983 - imap moving message loses attachments
Summary: imap moving message loses attachments
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Unmaintained
Component: general (show other bugs)
Version: 1.6
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-24 03:41 UTC by Greg Sullivan
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Sullivan 2004-02-24 03:41:56 UTC
Version:           1.6 (using KDE 3.2.0,  (3.0))
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease)
OS:          Linux (i686) release 2.4.24

From an IMAP server, I get an email with an attachment.
I "Save As ..." the attached file.
Then I move the message to a folder on my local disk (Message > Move To > Local Folders ...).
If I look at that message, the attachment(s) are gone.
Note that if I move the message to the local folder and then save the attachment to disk, there's no problem.
I have attachments loaded on demand for that IMAP server.
Comment 1 Carsten Burghardt 2004-02-25 00:29:33 UTC
CVS commit by burghard: 

Restore the original complete-state.
CCMAIL: 75983-done@bugs.kde.org


  M +4 -1      kmcommands.cpp   1.99.2.4
  M +1 -0      kmcommands.h   1.26.4.1


--- kdepim/kmail/kmcommands.cpp  #1.99.2.3:1.99.2.4
@@ -1704,4 +1704,5 @@ KMSaveAttachmentsCommand::KMSaveAttachme
 {
   // do not load the complete message but only parts
+  mMessageComplete = msg->isComplete();
   msg->setComplete( true );
   setDeletesItself( true );
@@ -1710,4 +1711,7 @@ KMSaveAttachmentsCommand::KMSaveAttachme
 void KMSaveAttachmentsCommand::execute()
 {
+  QPtrList<KMMessage> lst = retrievedMsgs();
+  if ( lst.count() == 1 ) // restore original complete state
+    lst.first()->setComplete(mMessageComplete);
   if ( mAttachments.count() > 0 )
   {
@@ -1716,5 +1720,4 @@ void KMSaveAttachmentsCommand::execute()
   }
   KMMessage *msg = 0;
-  QPtrList<KMMessage> lst = retrievedMsgs();
   QPtrListIterator<KMMessage> itr( lst );
 

--- kdepim/kmail/kmcommands.h  #1.26:1.26.4.1
@@ -301,4 +301,5 @@ private:
   QPtrList<partNode> mAttachments;
   bool mEncoded;
+  bool mMessageComplete;
 };
 


Comment 2 Andras Georgy Bekes 2005-10-24 14:12:38 UTC
In which version is it fixed? I have KMail Version 1.8.1 and I can reproduce the bug.
Comment 3 Andreas Gungl 2005-10-24 21:08:24 UTC
You should use at least KDE 3.4.2 (or even better KDE 3.4.3).
That means KMail 1.8.2 (KMail 1.8.3).