diff -r 2b9c00e2ab55 -r 150a5dd64ae5 pkiutilities/DeviceToken/Src/Generic/Server/DevTokenUtil.cpp --- a/pkiutilities/DeviceToken/Src/Generic/Server/DevTokenUtil.cpp Mon Mar 08 21:44:12 2010 +0000 +++ b/pkiutilities/DeviceToken/Src/Generic/Server/DevTokenUtil.cpp Sun Mar 14 13:12:09 2010 +0000 @@ -20,6 +20,7 @@ #include #include "DevTokenUtil.h" + /// Read/write drive the stores reside on _LIT(KFileStoreStandardDrive, "C:"); /// Rom drive where the initial store data is @@ -59,18 +60,23 @@ // --------------------------------------------------------------------------- // TBool FileUtils::ExistsL(RFs& aFs, const TDesC& aFile) - { + { TBool result = EFalse; - TBool open; - TInt err = aFs.IsFileOpen(aFile, open); - - if (err == KErrNone) + TUint attributes; + + TInt err = aFs.Att( aFile, attributes ); + + if ( err == KErrNone ) { result = ETrue; } - else if (err != KErrNotFound && err != KErrPathNotFound) + else if ( err == KErrNotFound || err == KErrPathNotFound ) { - User::Leave(err); + result = EFalse; + } + else + { + User::Leave( err ); } return result;