harvester/common/src/harvestercenreputil.cpp
branchRCL_3
changeset 47 b73252188534
parent 15 3cebc1a84278
child 63 e538444823de
--- a/harvester/common/src/harvestercenreputil.cpp	Thu Jul 15 19:07:24 2010 +0300
+++ b/harvester/common/src/harvestercenreputil.cpp	Thu Aug 19 10:20:41 2010 +0300
@@ -198,7 +198,9 @@
 	        continue;
 	        }
 		HBufC* pathBuf = path.AllocL();
-		aPaths.Append( pathBuf );
+		CleanupStack::PushL( pathBuf );
+		aPaths.AppendL( pathBuf );
+		CleanupStack::Pop( pathBuf );
 		}
 
 	CleanupStack::PopAndDestroy( &scanPathKeys );
@@ -214,14 +216,17 @@
 	repo->FindL( aPartialKey, KSearchMask, scanPathKeys );
 
 	TBuf<KMaxFileName> path;
+	
 	for( TInt i = scanPathKeys.Count() - 1; i >=0; i-- )
 		{
 	    const TInt error( repo->Get( scanPathKeys[i], path ) );
+	    
 	    if( error != KErrNone )
 	        {
 	        continue;
 	        }
 		TUint32 preinstalled = MdeConstants::MediaObject::ENotPreinstalled;
+		
 		if( path[ path.Length() - 1 ] != TChar('\\') )
 			{
 			User::LeaveIfError( repo->GetMeta( scanPathKeys[i], preinstalled ) );
@@ -231,7 +236,7 @@
 		item->iPath = path.AllocL();
 		item->iPreinstalled = preinstalled;
 		CleanupStack::Pop( item );
-		aItems.Append( item ); // ownership is transferred
+		aItems.AppendL( item ); // ownership is transferred
 		}
 
 	CleanupStack::PopAndDestroy( &scanPathKeys );