diff --git a/kmfoldercachedimap.cpp b/kmfoldercachedimap.cpp index 0f6717bdc..a4fb3c315 100644 --- a/kmfoldercachedimap.cpp +++ b/kmfoldercachedimap.cpp @@ -2227,16 +2227,6 @@ void KMFolderCachedImap::slotQuotaResult( KIO::Job* job ) } else kdWarning(5006) << "slotGetQuotaResult: " << job->errorString() << endl; - } else { - // There was no error, which means the server does support quota, but - // our info is not valid. That means that there is no quota on this folder, - // which we indicate by setting the name to something valid, but leaving the - // values invalid or setting them to invalid, in case we had info there before. - if ( !mQuotaInfo.isValid() ) { - mQuotaInfo = empty; - mQuotaInfo.name = "STORAGE"; - writeConfigKeysWhichShouldNotGetOverwrittenByReadConfig(); - } } if (mAccount->slave()) mAccount->removeJob(job); diff --git a/quotajobs.cpp b/quotajobs.cpp index eba7c21db..26857b212 100644 --- a/quotajobs.cpp +++ b/quotajobs.cpp @@ -116,10 +116,14 @@ QuotaJobs::GetStorageQuotaJob::GetStorageQuotaJob( KIO::Slave* slave, const KURL void QuotaJobs::GetStorageQuotaJob::slotQuotarootResult( const QStringList& roots ) { - if ( mStorageQuotaInfo.isValid() ) { - emit storageQuotaResult( mStorageQuotaInfo ); + if ( !mStorageQuotaInfo.isValid() && !error() ) { + // No error, so the account supports quota, but no usable info + // was transmitted => no quota set on the folder. Make the info + // valid, bit leave it empty. + mStorageQuotaInfo.name = "STORAGE"; } -// emitResult(); + if ( mStorageQuotaInfo.isValid() ) + emit storageQuotaResult( mStorageQuotaInfo ); } void QuotaJobs::GetStorageQuotaJob::slotQuotaInfoReceived( const QuotaInfoList& infos )