equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005-2009 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". |
20 #include "securitycheckutil.h" |
20 #include "securitycheckutil.h" |
21 #include "cleanuputils.h" |
21 #include "cleanuputils.h" |
22 #include <s32file.h> |
22 #include <s32file.h> |
23 #include <e32uid.h> |
23 #include <e32uid.h> |
24 #include <f32file.h> |
24 #include <f32file.h> |
|
25 #include <e32ldr_private.h> |
25 #include "securityinfo.h" |
26 #include "securityinfo.h" |
26 |
27 |
27 namespace Swi |
28 namespace Swi |
28 { |
29 { |
29 _LIT(KSidCacheFileName, "sidcache.cache"); |
30 _LIT(KSidCacheFileName, "sidcache.cache"); |
168 |
169 |
169 void CSidCache::FindDirsL(RFs& aFs, RPointerArray<HBufC>& aSearchDirs) |
170 void CSidCache::FindDirsL(RFs& aFs, RPointerArray<HBufC>& aSearchDirs) |
170 { |
171 { |
171 // Count() will increase if a subdirectory is encountered so don't 'optimise' |
172 // Count() will increase if a subdirectory is encountered so don't 'optimise' |
172 // the loop invariant ! |
173 // the loop invariant ! |
173 CleanupResetAndDestroyPushL(aSearchDirs); |
174 |
174 for (TInt i = 0; i < aSearchDirs.Count(); ++i) |
175 for (TInt i = 0; i < aSearchDirs.Count(); ++i) |
175 { |
176 { |
176 CDir* entries(0); |
177 CDir* entries(0); |
177 CDir* subDirs(0); |
178 CDir* subDirs(0); |
178 User::LeaveIfError(aFs.GetDir(*aSearchDirs[i], |
179 User::LeaveIfError(aFs.GetDir(*aSearchDirs[i], |
195 aSearchDirs.AppendL(tmpDirName); |
196 aSearchDirs.AppendL(tmpDirName); |
196 CleanupStack::Pop(tmpDirName); |
197 CleanupStack::Pop(tmpDirName); |
197 } |
198 } |
198 CleanupStack::PopAndDestroy(subDirs); |
199 CleanupStack::PopAndDestroy(subDirs); |
199 } |
200 } |
200 CleanupStack::Pop(&aSearchDirs); |
|
201 } |
201 } |
202 |
202 |
203 void CSidCache::ScanFileSystemL(RFs& aFs) |
203 void CSidCache::ScanFileSystemL(RFs& aFs) |
204 { |
204 { |
205 // Find all sub-directories of z:\sys\bin |
205 // Find all sub-directories of z:\sys\bin |