installationservices/swi/source/swis/server/sidcache.cpp
branchRCL_3
changeset 34 741e5bba2bd1
parent 0 ba25891c3a9e
child 65 7333d7932ef7
equal deleted inserted replaced
28:98a43fae6e2b 34:741e5bba2bd1
     1 /*
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   168 		
   168 		
   169 	void CSidCache::FindDirsL(RFs& aFs, RPointerArray<HBufC>& aSearchDirs)
   169 	void CSidCache::FindDirsL(RFs& aFs, RPointerArray<HBufC>& aSearchDirs)
   170 		{								
   170 		{								
   171 		// Count() will increase if a subdirectory is encountered so don't 'optimise'
   171 		// Count() will increase if a subdirectory is encountered so don't 'optimise'
   172 		// the loop invariant !				
   172 		// the loop invariant !				
   173 
   173 		CleanupResetAndDestroyPushL(aSearchDirs);
   174 		for (TInt i = 0; i < aSearchDirs.Count(); ++i) 
   174 		for (TInt i = 0; i < aSearchDirs.Count(); ++i) 
   175 			{
   175 			{
   176 			CDir* entries(0);
   176 			CDir* entries(0);
   177 			CDir* subDirs(0);
   177 			CDir* subDirs(0);
   178 			User::LeaveIfError(aFs.GetDir(*aSearchDirs[i], 
   178 			User::LeaveIfError(aFs.GetDir(*aSearchDirs[i], 
   195 				aSearchDirs.AppendL(tmpDirName);					
   195 				aSearchDirs.AppendL(tmpDirName);					
   196 				CleanupStack::Pop(tmpDirName);
   196 				CleanupStack::Pop(tmpDirName);
   197 				}
   197 				}
   198 			CleanupStack::PopAndDestroy(subDirs);
   198 			CleanupStack::PopAndDestroy(subDirs);
   199 			}
   199 			}
       
   200 		CleanupStack::Pop(&aSearchDirs);
   200 		}
   201 		}
   201 		
   202 		
   202 	void CSidCache::ScanFileSystemL(RFs& aFs)
   203 	void CSidCache::ScanFileSystemL(RFs& aFs)
   203 		{		
   204 		{		
   204 		// Find all sub-directories of z:\sys\bin		
   205 		// Find all sub-directories of z:\sys\bin