[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_4_BRANCH: kdepim/kmail
From:       David Faure <faure () kde ! org>
Date:       2005-04-13 12:05:12
Message-ID: 20050413120512.EA35D492 () office ! kde ! org
[Download RAW message or body]

CVS commit by faure: 

Use .mailboxname.compacted i.e. make it a hidden file, so that it doesn't appear as a new mailbox
in kmail after a restart, in case a crash happens while compaction is happening.


  M +5 -2      compactionjob.cpp   1.9.6.2


--- kdepim/kmail/compactionjob.cpp  #1.9.6.1:1.9.6.2
@@ -110,5 +110,8 @@ int MboxCompactionJob::executeNow( bool 
   }
 
-  mTempName = realLocation() + ".compacted";
+  const QFileInfo pathInfo( realLocation() );
+  // Use /dir/.mailboxname.compacted so that it's hidden, and doesn't show up after restarting kmail
+  // (e.g. due to an unfortunate crash while compaction is happening)
+  mTempName = pathInfo.dirPath() + "/." + pathInfo.fileName() + ".compacted";
 
   mode_t old_umask = umask(077);
@@ -128,5 +131,5 @@ int MboxCompactionJob::executeNow( bool 
   mCurrentIndex = 0;
 
-  kdDebug(5006) << "MboxCompactionJob: starting to compact in folder " << mSrcFolder->location() << \
endl; +  kdDebug(5006) << "MboxCompactionJob: starting to compact folder " << mSrcFolder->location() << " \
into " << mTempName << endl;  connect( &mTimer, SIGNAL( timeout() ), SLOT( slotDoWork() ) );
   if ( !mImmediate )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic