summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/dir/resourcedir.cpp
Unidiff
Diffstat (limited to 'kabc/plugins/dir/resourcedir.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/dir/resourcedir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index eccd482..fac06a1 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -207,12 +207,14 @@ bool ResourceDir::save( Ticket *ticket )
207{ 207{
208 kdDebug(5700) << "ResourceDir::save(): '" << mPath << "'" << endl; 208 kdDebug(5700) << "ResourceDir::save(): '" << mPath << "'" << endl;
209 209
210 AddressBook::Iterator it; 210 AddressBook::Iterator it;
211 bool ok = true; 211 bool ok = true;
212 212
213 mDirWatch.stopScan();
214
213 for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { 215 for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) {
214 if ( (*it).resource() != this || !(*it).changed() ) 216 if ( (*it).resource() != this || !(*it).changed() )
215 continue; 217 continue;
216 218
217 QFile file( mPath + "/" + (*it).uid() ); 219 QFile file( mPath + "/" + (*it).uid() );
218 if ( !file.open( IO_WriteOnly ) ) { 220 if ( !file.open( IO_WriteOnly ) ) {
@@ -224,12 +226,13 @@ bool ResourceDir::save( Ticket *ticket )
224 226
225 // mark as unchanged 227 // mark as unchanged
226 (*it).setChanged( false ); 228 (*it).setChanged( false );
227 229
228 file.close(); 230 file.close();
229 } 231 }
232 mDirWatch.startScan();
230 233
231 delete ticket; 234 delete ticket;
232 unlock( mPath ); 235 unlock( mPath );
233 236
234 return ok; 237 return ok;
235} 238}