equal
deleted
inserted
replaced
308 |
308 |
309 // delete the binary files |
309 // delete the binary files |
310 CDir* dir=NULL; |
310 CDir* dir=NULL; |
311 TBool partiallyDeleted=EFalse; |
311 TBool partiallyDeleted=EFalse; |
312 TInt error = iServer.GetFileDirectoryListing(id, filename, dir); |
312 TInt error = iServer.GetFileDirectoryListing(id, filename, dir); |
|
313 if(dir) |
|
314 { |
|
315 CleanupStack::PushL(dir); |
|
316 } |
|
317 |
313 if (error==KErrNone) |
318 if (error==KErrNone) |
314 { |
319 { |
315 User::LeaveIfError(iServer.FileSession().SetSessionPath(filename)); |
320 User::LeaveIfError(iServer.FileSession().SetSessionPath(filename)); |
316 // remove any files |
321 // remove any files |
317 TInt fCount=dir->Count(); |
322 TInt fCount=dir->Count(); |
384 } |
389 } |
385 |
390 |
386 // deletion was successful |
391 // deletion was successful |
387 iDeletedEntries->AppendL(id); // will not leave, space has been reserved |
392 iDeletedEntries->AppendL(id); // will not leave, space has been reserved |
388 iMovedEntries->AppendL(id); // will not leave, space has been reserved |
393 iMovedEntries->AppendL(id); // will not leave, space has been reserved |
389 delete dir; |
394 if(dir) |
|
395 { |
|
396 CleanupStack::PopAndDestroy(dir); |
|
397 } |
390 return; |
398 return; |
391 |
399 |
392 failed: |
400 failed: |
393 if (partiallyDeleted) |
401 if (partiallyDeleted) |
394 { |
402 { |
422 } |
430 } |
423 |
431 |
424 // we have failed, move onto next state |
432 // we have failed, move onto next state |
425 iState = iPCSynced ? EIndexIndividually : EIndex; |
433 iState = iPCSynced ? EIndexIndividually : EIndex; |
426 iError=error; |
434 iError=error; |
427 delete dir; |
435 if(dir) |
|
436 { |
|
437 CleanupStack::PopAndDestroy(dir); |
|
438 } |
|
439 |
428 } |
440 } |
429 |
441 |
430 |
442 |
431 |
443 |
432 void CMsvDelete::DeleteAllIndexEntries() |
444 void CMsvDelete::DeleteAllIndexEntries() |