From kmail-devel Wed Nov 12 22:53:59 2003 From: Carsten Burghardt Date: Wed, 12 Nov 2003 22:53:59 +0000 To: kmail-devel Subject: Re: [Bug 64388] save body part attachment problem X-MARC-Message: https://marc.info/?l=kmail-devel&m=106867769606432 On Sunday 09 November 2003 23:46, Ingo Klöcker wrote: > I don't think that the new handler structure works differently from what > we had before. Before we did the following if an icon was clicked: >      // clicked onto an attachment >      mAtmCurrent = id; >      mAtmCurrentName = aUrl.path(); >      slotAtmOpen(); > with >   void KMReaderWin::slotAtmOpen() >   { >     openAttachment( mAtmCurrent, mAtmCurrentName ); >   } > > Now the handler directly calls openAttachment( id, aUrl.path() ) so this > is equivalent to the old code. > > I just verified that it works with local folders. You're right, the problem is the following part in KMReaderWin::writeMessagePartToTempFile if( size == 0 || !kBytesToFile( data.data(), size, fname, false, false, false ) ) return QString::null; The size is of course "0" if you have load-on-demand enabled as the attachment is not downloaded yet. If you comment this out everything works again. Is there an actual need for this check? Do you want a "if imap else" switch or can we just leave it out? Carsten _______________________________________________ KMail Developers mailing list kmail@kde.org https://mail.kde.org/mailman/listinfo/kmail