Version: (using KDE KDE 3.0.4) Installed from: SuSE RPMs Compiler: gcc (GCC) 3.2 OS: Linux 1. Create a data-loss maildir folder at the toplevel of Mail 2. Copy some email into the data-loss folder. Observe that files are in the ~/Mail/data-loss/cur directory. 3. Settings->Configure Kmail->Network->Receiving 4. Add a maildir mailbox 5. Set Location to ~/Mail/data-loss and Destination folder to data-loss, and ok it. 6. apply and ok the configuration 7. File->Check Mail->Unnamed 8. Observe that ~/Mail/data-loss/cur is empty. Also observe that clicking on "new" message entries in data-loss causes them to be invalid. Using KMail 1.4.3 (using KDE 3.0.5) I guess I was just expecting kmail to not empty/modify the Location's cur directory.
Subject: Re: New: data loss setting mail receiving location and destination to same maildir On Sunday 17 November 2002 04:15, Leo Davis wrote: > I guess I was just expecting kmail to not empty/modify the Location's > cur directory. Exactly. Obviously this assumption was wrong. We will disallow setting the location of a maildir account to a folder in ~/Mail to prevent others from making the same mistake.
Was able to reproduce this in kmail 1.5.3 also.
It is still reproducible in 1.5.93 [KDE 3.1.93 (CVS>=20031028)]. I may only add that after checking mail in that mailbox amount of messages doubles but they are all corrupted (folder is in fact empty).
Subject: kdepim/kmail CVS commit by tilladam: Don't allow users to specify the folder itself as the target folder of a maildir acccount. Since we are in string freeze this simply sets the target folder to the main inbox. After 3.2 we should pop up a dialog asking the user to select a different one. CCMAIL: 50841-done@bugs.kde.org M +13 -5 accountdialog.cpp 1.134 --- kdepim/kmail/accountdialog.cpp #1.133:1.134 @@ -1496,4 +1496,15 @@ void AccountDialog::saveSettings() mAccount->setName( mMaildir.nameEdit->text() ); acctMaildir->setLocation( mMaildir.locationEdit->currentText() ); + + KMFolder *targetFolder = *mFolderList.at(mMaildir.folderCombo->currentItem()); + if ( targetFolder->location() == acctMaildir->location() ) { + /* + Prevent data loss if the user sets the destination folder to be the same as the + source account maildir folder by setting the target folder to the inbox. + ### FIXME post 3.2: show dialog and let the user chose another target folder + */ + targetFolder = kmkernel->inboxFolder(); + } + mAccount->setFolder( targetFolder ); } mAccount->setCheckInterval( mMaildir.intervalCheck->isChecked() ? @@ -1505,7 +1516,4 @@ void AccountDialog::saveSettings() mAccount->setPrecommand( mMaildir.precommand->text() ); - - mAccount->setFolder( *mFolderList.at(mMaildir.folderCombo->currentItem()) ); - }