Tk Library Source Code

View Ticket
Login
Ticket UUID: 3604129
Title: added imap "copy" command
Type: Patch Version: None
Submitter: magnatune Created on: 2013-02-11 17:24:26
Subsystem: imap4 Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2013-02-14 10:34:35
Resolution: Accepted Closed By: andreas_kupries
    Closed on: 2013-02-14 03:34:35
Description:
I've added a proc for the imap "copy" function, which is needed if you want to move a message from one mailbox to another.  Currently, it's not possible to move messages between folders with the imap4 library. This proc fixes that problem.

To add this feature, paste the following proc below the "proc expunge" function in imap4.tcl

May I ask that you add this patch to the imap library ?

Thanks!

-john



   # copy : copy a message to a destination mailbox
   proc copy {chan msgid mailbox} {
       if {[simplecmd $chan COPY SELECT [list $msgid $mailbox]]} {
           return 1
       }
       return 0
   }
User Comments: andreas_kupries added on 2013-02-14 10:34:35:

allow_comments - 1

Thanks Gerhard.
Reviewing the change it seems that the bug could only trigger for bad data, when trying to report that problem.
That explains why we have not seen it before, nobody had bad data, it seems.
And without a test suite at all where error could be forced it was never detected.

Ok. Accepted.
Revision [b3a3d726b1].
Pushed.
Version bumped to 0.5.1.

exgerhardr added on 2013-02-14 01:25:25:
Andreas, basically all your changes are included in my tgz, but in addition a bug is repaired (which was never reported).
I've added a diff (imap4-0.51.patch) against your version 0.5 (https://core.tcl.tk/tcllib/ci/343787b53a?sbs=0), so this patch only removes the bug now.

exgerhardr added on 2013-02-14 01:20:47:

File Added - 460522: imap4-0.51.patch

exgerhardr added on 2013-02-14 00:50:18:

File Deleted - 460521:

exgerhardr added on 2013-02-14 00:40:39:

File Added - 460521: imap4-0.5.patch

andreas_kupries added on 2013-02-13 06:57:22:
Gerhard, how does the attached tarball compare against the changes I made?
See https://core.tcl.tk/tcllib/ci/343787b53a?sbs=0
Also, contact me by mail so that I can re-create a dev account for you at the fossil repository.

exgerhardr added on 2013-02-13 06:16:25:

allow_comments - 0

File (patched version) added:  imap4-0.5.tgz
Content: ChangeLog, imap4.man, imap4.tcl, pkgIndex.tcl
Bug repaired.

exgerhardr added on 2013-02-13 06:11:28:

File Added - 460472: imap4-0.5.tgz

andreas_kupries added on 2013-02-13 04:25:13:

allow_comments - 1

Revision [343787b53ab6a48bf6f0c15032d808d16f7a3862].
Pushed.
Version in Fossil now is 0.5.

Attachments: