[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#408296: possible fix + patch



Hi,
	I've sent the below patch and report to the kde bug mentioned earlier.  They 
haven't yet confirmed my original bug....

	The KMFolder destructor calls 
FolderStorage::deregisterFromMessageDict() and this causes the .index.ids
file to be written to disk again after kmail originally deleted it.
	This can be avoided if "mExportsSernums = false;" after the .index.ids
file is deleted in FolderStorage::remove().
	This works because just before writing the .index.ids the code 
(FolderStorage::writeFolderIdsFile()) does not write the .index.ids file 
if mExportsSernums == false.


folderstorage.cpp
--------------------------------------------------------
void FolderStorage::remove()

   if ( mExportsSernums )
+  {
     KMMsgDict::mutableInstance()->removeFolderIds( *this );
+    mExportsSernums = false;   // do not writeFolderIds after removal
+  }
--------------------------------------------------------

Thanks!
	C.
--- folderstorage.cpp.old	2007-02-02 14:41:51.000000000 -0500
+++ folderstorage.cpp	2007-02-02 14:42:50.000000000 -0500
@@ -724,7 +724,10 @@
   close(true);
 
   if ( mExportsSernums )
+  {
     KMMsgDict::mutableInstance()->removeFolderIds( *this );
+    mExportsSernums = false;	// do not writeFolderIds after removal
+  }
   unlink(QFile::encodeName(indexLocation()) + ".sorted");
   unlink(QFile::encodeName(indexLocation()));
 

Reply to: