htiui/HtiServicePlugins/HtiSysInfoServicePlugin/src/HtiSysInfoServicePlugin.cpp
branchRCL_3
changeset 11 454d022d514b
parent 6 69ec17276f52
child 12 aefcba28a3e0
--- a/htiui/HtiServicePlugins/HtiSysInfoServicePlugin/src/HtiSysInfoServicePlugin.cpp	Tue Apr 27 16:38:40 2010 +0300
+++ b/htiui/HtiServicePlugins/HtiSysInfoServicePlugin/src/HtiSysInfoServicePlugin.cpp	Tue May 11 16:14:15 2010 +0300
@@ -2864,13 +2864,20 @@
     TFindFile finder( iFs );
     CDir* dir = NULL;
     TInt err = finder.FindWildByDir(KMatchFileName, KTempFilePath, dir);
-    while ( err == KErrNone )
+    TInt safeDeleteCount = 0;
+    while ( err == KErrNone && safeDeleteCount < 20)
         {
+        safeDeleteCount++;
         TFileName path;
         path.Copy(finder.File());
-        iFileMan->Delete(path);
+        HTI_LOG_FORMAT( "found file: %S", &path );
+        TInt ret = iFileMan->Delete(path);
         delete dir;
         dir = NULL;
+        if(ret != KErrNone)
+            {
+            break;
+            }
         err = finder.FindWildByDir(KMatchFileName, KTempFilePath, dir);
         }
     HTI_LOG_FUNC_OUT("CHtiSysInfoServicePlugin::CleanUpTempFiles");