diff -r 1772663c5b4e -r 60626d494346 filemanager/Engine/src/CFileManagerUtils.cpp --- a/filemanager/Engine/src/CFileManagerUtils.cpp Mon Mar 15 12:39:38 2010 +0200 +++ b/filemanager/Engine/src/CFileManagerUtils.cpp Wed Mar 31 21:15:58 2010 +0300 @@ -208,7 +208,7 @@ // CFileManagerUtils::IsDrmProtectedFile // ----------------------------------------------------------------------------- // -TBool CFileManagerUtils::IsDrmProtectedFile( const TDesC& aFullPath ) const +TBool CFileManagerUtils::IsDrmProtectedFileL( const TDesC& aFullPath ) const { if ( !iDrmFullSupported ) { @@ -226,8 +226,14 @@ RFile64 drmFile; - User::LeaveIfError( drmFile.Open( - iFs, aFullPath, EFileRead | EFileShareReadersOrWriters ) ); + TInt err = drmFile.Open( + iFs, aFullPath, EFileRead | EFileShareReadersOrWriters ); + if( err != KErrNone ) + { + // Just assume it is not protected when we fail to open it. + drmFile.Close(); + return EFalse; + } CleanupClosePushL( drmFile ); DRM::CDrmUtility *drmCheck = DRM::CDrmUtility::NewLC(); @@ -355,7 +361,7 @@ { fileType |= CFileManagerItemProperties::EFile; - if ( IsDrmProtectedFile( aFullPath) ) + if ( IsDrmProtectedFileL( aFullPath) ) { fileType |= CFileManagerItemProperties::EDrmProtected; if ( IsDrmLocalDataFile( aFullPath ) ) @@ -402,7 +408,7 @@ else { fileType |= CFileManagerItemProperties::EFile; - if ( IsDrmProtectedFile( aFullPath) ) + if ( IsDrmProtectedFileL( aFullPath) ) { fileType |= CFileManagerItemProperties::EDrmProtected; }