<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>114985</bug_id>
          
          <creation_ts>2005-10-24 11:59:52 +0000</creation_ts>
          <short_desc>subfolders and included mails lost when moving folder to cachedimap account</short_desc>
          <delta_ts>2007-09-14 12:17:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kmail</product>
          <component>general</component>
          <version>1.8.3</version>
          <rep_platform>openSUSE</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Johannes Stamminger">Johannes.Stamminger</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          <cc>coolo</cc>
    
    <cc>esigra</cc>
    
    <cc>maze</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>40</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>384075</commentid>
    <comment_count>0</comment_count>
    <who name="Johannes Stamminger">Johannes.Stamminger</who>
    <bug_when>2005-10-24 11:59:53 +0000</bug_when>
    <thetext>Version:           1.8.3 (using KDE KDE 3.4.91)
Installed from:    SuSE RPMs
OS:                Linux

Having some folders like

Local Folders
  |-Inbox
  |-Test1
      |-Test2

When moving Test1 to a CACHEDIMAP account, Test2 and all mails contained get lost without any comment/message. Moving back to the local folders area does not bring them back.

Same problem when moving from cachedimap account to local folders area.

Same problem when moving within the cachedimap account area.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>385608</commentid>
    <comment_count>1</comment_count>
    <who name="Andreas Gungl">a.gungl</who>
    <bug_when>2005-10-29 17:32:13 +0000</bug_when>
    <thetext>Confirmed. Serverity raised.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>392149</commentid>
    <comment_count>2</comment_count>
      <attachid>13593</attachid>
    <who name="Andreas Gungl">a.gungl</who>
    <bug_when>2005-11-22 13:57:53 +0000</bug_when>
    <thetext>Created attachment 13593
fix moving of folders containing subfolders from local to dIMAP accounts

The patch fixes the moving of folders containing subfolders from local to dIMAP
accounts. No messages are lost any longer.

It doesn&apos;t solve moving from dIMAP to local accounts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>392506</commentid>
    <comment_count>3</comment_count>
    <who name="Andreas Gungl">a.gungl</who>
    <bug_when>2005-11-23 16:53:06 +0000</bug_when>
    <thetext>Johannes, can you tell me how you managed to move nested folders from cachedimap to local accounts or within the cachedimap account area?

Nested folders shouldn&apos;t have the Move Folder To popup menu item. How can you have lost messages except when moving from the local account to a cachedimap account?
(There is a bug which shows this menu item for nested folders which have just been moved to a cachedimap account. However you stated that you could only move one folder and the child folders where lost. So how could you have a child folder then? In fact, you need some additional code like in my patch to see the mentioned bug.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>392508</commentid>
    <comment_count>4</comment_count>
      <attachid>13613</attachid>
    <who name="Andreas Gungl">a.gungl</who>
    <bug_when>2005-11-23 16:59:05 +0000</bug_when>
    <thetext>Created attachment 13613
fix for moving around nested folders from a local account

Okay, here is a patch which allows moving of nested folders from a local
account to a cachedimap account. The opposite direction would work as well but
is allowed only for leaf folders.
I made sure that fresh copies of nested folders have the correct state. So
AFAICT it&apos;s not possible to move nested folders from within a cachedimap
account. In case I&apos;ve overseen a constellation, the nested folders are moved to
a local account w/o data loss though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>393531</commentid>
    <comment_count>5</comment_count>
    <who name="Johannes Stamminger">Johannes.Stamminger</who>
    <bug_when>2005-11-28 09:23:21 +0000</bug_when>
    <thetext>&gt; Johannes, can you tell me how you managed to move nested folders from
&gt; cachedimap to local accounts or within the cachedimap account area? 

I used context menue for the toplevel folder (Test1).


Today I played again with the moving:

I used context menues to create locally a.m. folders. Then I copied some mails into them and again used the context menue item for the toplevel (Test1) folder &quot;Move Folder To&quot; to move the folder to the DIMAP account (placing toplevel).

2nd test was the same but moving to the IMAP account (pointing to the same mailbox as the DIMAP one).

3rd test was to create the folders using a IMAP account. Creation using the DIMAP failed: the DIMAP showed Test2 as subfolder of Test1. But IMAP and subscriptions tell of them to be in parallel.
BTW, the IMAP and the DIMAP seem to share the subscriptions! When having created those folders after some time the DIMAP account showed those folders automatically. When unsubscribing using the DIMAP account, the folders first (!) disappeared from the IMAP account and later (!) from the DIMAP one. I do not feel this to be intended behaviour ... ?
Due to this there was no need to subscribe separately the DIMAP account for the new folders. Within the DIMAP account I then could use context menue item to move the folders (within the IMAP account the menue item does not exist) to the local folders (toplevel).
I just saw a new detail about this last move: sometime after I moved, the IMAP account complained about the missing Test1 folder. Having a look to the subscriptions, Test1 is not subscribed (not in IMAP nor DIMAP) but the Test2 subfolder is (in both). The IMAP account shows both, Test1 (now empty) and below Test2 (still containing the mails), the DIMAP shows none of them. For the DIMAP I then re-subscribed both (unsubscribe Test1, subscribe Test1 and Test2; every step followed by cache refresh from the DIMAP account troubleshooting context menue). Afterwards DIMAP showed the same as the IMAP.
And: I was able to move the remaining subfolder seperately to the local folders.

Summary:
- when moving from local to DIMAP, subfolders and mails contained are lost
- when moving from local to IMAP, subfolders and mails contained are lost
- when moving from DIMAP to local or to another folder within the DIMAP, no folders or mails are lost but
    - display is confused
    - unexpectedly subfolders and their mails are not moved, only mails of the toplevel folder are moved
- connecting to an IMAP account both ways, IMAP and DIMAP, in parallel, subscriptions are shared. And the display of one gets confused on changes to the other.
- creation of subfolder succeeds only with the parent being synced to the server. When creating within a short time both, parent and subfolder, this leads to two folders in parallel after having synced with the server.
 - moving from IMAP to local or DIMAP is not possible, no menue entry for doing so</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>393536</commentid>
    <comment_count>6</comment_count>
    <who name="Andreas Gungl">a.gungl</who>
    <bug_when>2005-11-28 10:22:28 +0000</bug_when>
    <thetext>Am Montag, 28. November 2005 09:23 schrieb Johannes Stamminger:
&gt; Summary:


Hi Johannes, thanks for your effort.

&gt; - when moving from local to DIMAP, subfolders and mails contained are lost
&gt; - when moving from local to IMAP, subfolders and mails contained are lost
&gt; - when moving from DIMAP to local or to another folder within the DIMAP, no
&gt; folders or mails are lost but 
&gt;    - display is confused 
&gt;    - unexpectedly subfolders and their mails are not moved, only mails of
&gt;       the toplevel folder are moved


Well, actually you should only be able to move folders without child folders 
in an DIMAP account. But this may fail when subscription comes into play. I 
haven&apos;t tested with online IMAP so far.

&gt; - connecting to an IMAP account both ways, IMAP and DIMAP, in parallel,
&gt; subscriptions are shared. And the display of one gets confused on changes 
&gt; to the other. 


This is the way subscription works. The subscription data is stored on the 
server per account. All clients share this data when accessing an account 
which is intended.

&gt; - creation of subfolder succeeds only with the parent being synced to the
&gt; server. When creating within a short time both, parent and subfolder, this
&gt; leads to two folders in parallel after having synced with the server. 


I need to check this, but it will take a while as currently I have no access 
to a server.

&gt; - moving from IMAP to local or DIMAP is not possible, no menue entry 
&gt; for doing so 


That&apos;s intended AFAIK.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396836</commentid>
    <comment_count>7</comment_count>
    <who name="Jonas Widarsson">jonas</who>
    <bug_when>2005-12-08 21:07:43 +0000</bug_when>
    <thetext>I decided to try online IMAP today. Never done that before.
Of course I lost ALL OF MY MAIL to my friends 3 years back, because of trying to move several folders at the same time (Kmail willingly allowed it no Hour-glass or anything.)

this is moving from local folders to online IMAP folders.

The effect:
The first folder was large and took about 15 minutes to transfer. I started transferring 5 other folders while waiting.
And when activity ended I had the folders I moved on the IMAP server but they were all empty but the first big one.

If this is not relevant to this exact bug I&apos;ll be happy to report it in a new bug using all caps. 
:(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396837</commentid>
    <comment_count>8</comment_count>
    <who name="Jonas Widarsson">jonas</who>
    <bug_when>2005-12-08 21:08:41 +0000</bug_when>
    <thetext>Forgot to say this is kde 3.5 from svn some days ago, with kmail 1.9</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396910</commentid>
    <comment_count>9</comment_count>
    <who name="Andreas Gungl">a.gungl</who>
    <bug_when>2005-12-09 10:15:20 +0000</bug_when>
    <thetext>Jonas, your problem of loosing the content of the child folders is exactly the one which the bug report is about.
If you&apos;re running a self-compiled KDE, you can apply the patch attached to this report to minimize the chance for a message loss.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396937</commentid>
    <comment_count>10</comment_count>
    <who name="Jonas Widarsson">jonas</who>
    <bug_when>2005-12-09 11:52:18 +0000</bug_when>
    <thetext>Thanks,
The 13613 patch worked great.

kdedev@jw ~/src/kde-svn-3.5/kdepim/kmail $ patch &lt;movenestedfolderspatch.diff
patching file renamejob.cpp
patching file renamejob.h
patching file kmfolder.cpp
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file kmfolder.cpp.rej
kdedev@jw ~/src/kde-svn-3.5/kdepim/kmail $

I just followed the defaults that patch suggested regarding kmfolder.cpp. Never applied a patch before so I didn&apos;t completely understand -R when doing it, but it compiled fine against Revision: 486913 anyway.

Big thanks. Is this one of those patches that change too much to get committed to the branch? no? It&apos;s IMHO such a serious bug I think it should be committed. (haven&apos;t looked at the code though)

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>397054</commentid>
    <comment_count>11</comment_count>
    <who name="Andreas Gungl">a.gungl</who>
    <bug_when>2005-12-09 19:54:50 +0000</bug_when>
    <thetext>&gt; Big thanks. Is this one of those patches that change too much to get
&gt; committed to the branch? no? It&apos;s IMHO such a serious bug I think it should
&gt; be committed. (haven&apos;t looked at the code though)


Each patch is a risk of it&apos;s own. This one has been tested only by me. I 
haven&apos;t got feedback from other people so far (except from you).

Anyway, the core developers prefer disabling the move function for folders to 
be on the safe side. But I haven&apos;t got around with that change because I&apos;ve 
spent my time on report 113730 which is critical as well.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>397145</commentid>
    <comment_count>12</comment_count>
    <who name="Andreas Gungl">a.gungl</who>
    <bug_when>2005-12-10 05:08:23 +0000</bug_when>
    <thetext>SVN commit 487310 by gungl:

Disable folders in IMAP and cached IMAP accounts as
destination for a folder move to avoid loosing all
messages in the subfolders when moving nested folders.

Moving to a local destination folder works correct.

This is only a workaround for the real problem which is
addressed by a patch. It was aggreed on not applying the
patch to the KDE 3.5 branch before it&apos;s been tested by
more people.
BUG:114985


 M  +12 -0     kmfoldertree.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmfoldertree.cpp #487309:487310
@@ -1780,6 +1780,18 @@
       item = item-&gt;nextSibling();
       continue;
     }
+    if ( action == MoveFolder ) {
+      // FIXME remove in KDE 4
+      // skip all but local folders if a folder is to be moved
+      // because moving of nested folders to IMAP and DIMAP
+      // looses all messages in the subfolders
+      if ( fti-&gt;protocol() != KFolderTreeItem::Local
+        &amp;&amp; fti-&gt;protocol() != KFolderTreeItem::NONE )
+      {
+        item = item-&gt;nextSibling();
+        continue;
+      }
+    }
     QString label = fti-&gt;text( 0 );
     label.replace( &quot;&amp;&quot;,&quot;&amp;&amp;&quot; );
     if ( fti-&gt;firstChild() )
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>457459</commentid>
    <comment_count>13</comment_count>
    <who name="Andrei Kolu">antik</who>
    <bug_when>2006-08-01 18:41:40 +0000</bug_when>
    <thetext>All mail lost after moving folder to cached IMAP folder. After syncronization with server it shows that all folders is syncronized but after system proper shutdown and start kmail lost all mail that is moved to IMAP folder. Worse yet it does not show any mail in pop folder too- with other mail client opera I can see pop mail account mails. Moved cached IMAP folder is empty on server side. 

KDE Version  1.9.3 (KDE 3.5.3, compiled sources)
Application  E-Mail Client
Operating System  FreeBSD (i386) release 6.1-RELEASE-p2
Compiler  gcc version 3.4.4 [FreeBSD] 20050518</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>13593</attachid>
            <date>2005-11-22 13:57:53 +0000</date>
            <delta_ts>2005-11-23 16:59:05 +0000</delta_ts>
            <desc>fix moving of folders containing subfolders from local to dIMAP accounts</desc>
            <filename>kmail-foldermove-dimap.diff</filename>
            <type>text/plain</type>
            <size>3771</size>
            <attacher name="Andreas Gungl">a.gungl</attacher>
            
              <data encoding="base64">SW5kZXg6IHJlbmFtZWpvYi5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gcmVuYW1lam9iLmNwcAkocmV2aXNp
b24gNDgxMjc2KQorKysgcmVuYW1lam9iLmNwcAkod29ya2luZyBjb3B5KQpAQCAtNTgsNiArNTgs
NyBAQAogICAgbVN0b3JhZ2UoIHN0b3JhZ2UgKSwgbU5ld1BhcmVudCggbmV3UGFyZW50ICksCiAg
ICBtTmV3TmFtZSggbmV3TmFtZSApLCBtTmV3Rm9sZGVyKCAwICkKIHsKKyAgbVN0b3JhZ2VUZW1w
T3BlbmVkID0gMDsKICAgbU9sZE5hbWUgPSBzdG9yYWdlLT5uYW1lKCk7CiAgIGlmICggc3RvcmFn
ZS0+Zm9sZGVyVHlwZSgpID09IEtNRm9sZGVyVHlwZUltYXAgKSB7CiAgICAgbU9sZEltYXBQYXRo
ID0gc3RhdGljX2Nhc3Q8S01Gb2xkZXJJbWFwKj4oc3RvcmFnZSktPmltYXBQYXRoKCk7CkBAIC0x
MzEsNyArMTMyLDEyIEBACiAgICAgICBLTUZvbGRlckNhY2hlZEltYXAqIG5ld1N0b3J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cm4gMDsKICAgbUNoaWxkLT5y
ZWxvYWQoKTsK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>13613</attachid>
            <date>2005-11-23 16:59:05 +0000</date>
            <delta_ts>2005-11-23 16:59:05 +0000</delta_ts>
            <desc>fix for moving around nested folders from a local account</desc>
            <filename>kmail-foldermove-dimap-1.diff</filename>
            <type>text/plain</type>
            <size>4973</size>
            <attacher name="Andreas Gungl">a.gungl</attacher>
            
              <data encoding="base64">SW5kZXg6IHJlbmFtZWpvYi5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gcmVuYW1lam9iLmNwcAkocmV2aXNp
b24gNDgxMjc2KQorKysgcmVuYW1lam9iLmNwcAkod29ya2luZyBjb3B5KQpAQCAtNTgsNiArNTgs
NyBAQAogICAgbVN0b3JhZ2UoIHN0b3JhZ2UgKSwgbU5ld1BhcmVudCggbmV3UGFyZW50ICksCiAg
ICBtTmV3TmFtZSggbmV3TmFtZSApLCBtTmV3Rm9sZGVyKCAwICkKIHsKKyAgbVN0b3JhZ2VUZW1w
T3BlbmVkID0gMDsKICAgbU9sZE5hbWUgPSBzdG9yYWdlLT5uYW1lKCk7CiAgIGlmICggc3RvcmFn
ZS0+Zm9sZGVyVHlwZSgpID09IEtNRm9sZGVyVHlwZUltYXAgKSB7CiAgICAgbU9sZEltYXBQYXRo
ID0gc3RhdGljX2Nhc3Q8S01Gb2xkZXJJbWFwKj4oc3RvcmFnZSktPmltYXBQYXRoKCk7CkBAIC03
Nyw3ICs3OCw4IEBACiAgICAgLy8gbW92ZSB0aGUgZm9sZGVyIHRvIGEgZGlmZmVyZW50IHBhcmVu
dAogICAgIEtNRm9sZGVyVHlwZSB0eXBlID0gbVN0b3JhZ2UtPmZvbGRlclR5cGUoKTsKICAgICBp
ZiAoICggdHlwZSA9PSBLTUZvbGRlclR5cGVNYm94IHx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SW1hcCkgPyBLTUltYXBEaXIgOiBLTVN0YW5kYXJkRGlyKTsKKyAgS01Gb2xkZXJEaXJU
eXBlIG5ld1R5cGUgPSBLTVN0YW5kYXJkRGlyOworICBpZiggZm9sZGVyVHlwZSgpID09IEtNRm9s
ZGVyVHlwZUNhY2hlZEltYXAgKQorICAgIG5ld1R5cGUgPSBLTURJbWFwRGlyOworICBlbHNlIGlm
KCBmb2xkZXJUeXBlKCkgPT0gS01Gb2xkZXJUeXBlSW1hcCApCisgICAgbmV3VHlwZSA9IEtNSW1h
cERpcjsKKworICBtQ2hpbGQgPSBuZXcgS01Gb2xkZXJEaXIoIHRoaXMsIHBhcmVudCgpLCBjaGls
ZE5hbWUsIG5ld1R5cGUgKTsKICAgaWYoICFtQ2hpbGQgKQogICAgIHJldHVybiAwOwogICBtQ2hp
bGQtPnJlbG9hZCgpOwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>