# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1265061811 -7200 # Node ID d1daf54a55b566a52de01b8f9cb5125d2b06e631 # Parent 6a9f87576119b0604ce6b5d3b654c1618df5955f Revision: 201003 Kit: 201005 diff -r 6a9f87576119 -r d1daf54a55b5 filemanager/App/src/CFileManagerMemoryStoreView.cpp --- a/filemanager/App/src/CFileManagerMemoryStoreView.cpp Mon Jan 18 20:09:41 2010 +0200 +++ b/filemanager/App/src/CFileManagerMemoryStoreView.cpp Tue Feb 02 00:03:31 2010 +0200 @@ -209,17 +209,15 @@ { HBufC* error = NULL; TFileManagerDriveInfo& drvInfo( DriveInfo() ); - TInt usb_err( KErrNone ); if ( drvInfo.iState & ( TFileManagerDriveInfo::EDriveRemovable | TFileManagerDriveInfo::EDriveRemote ) ) { - TRAP( usb_err , RefreshDriveInfoL() ); + TRAP_IGNORE( RefreshDriveInfoL() ); } - if( usb_err != KErrNone ) - { - error = StringLoader::LoadLC( R_QTN_MEMC_MAINPAGE_ERROR1 ); - } + + TInt drvNum = drvInfo.iDrive; + iEngine.GetDriveInfoL(drvNum,drvInfo); INFO_LOG1( "CFileManagerMemoryStoreView::DriveAvailableL-drvState=%d", drvInfo.iState ) diff -r 6a9f87576119 -r d1daf54a55b5 filemanager/App/src/CFileManagerViewBase.cpp --- a/filemanager/App/src/CFileManagerViewBase.cpp Mon Jan 18 20:09:41 2010 +0200 +++ b/filemanager/App/src/CFileManagerViewBase.cpp Tue Feb 02 00:03:31 2010 +0200 @@ -3319,19 +3319,6 @@ dimSend = ETrue; } - /* Codes below will cause trouble for large amount file selection - if ( !dimSend ) - { - // Check if there are files to send - TInt dummy( 0 ); - CArrayFixFlat< TInt >* files = GetSendFilesLC( dummy ); - if ( !files->Count() ) - { - dimSend = ETrue; - } - CleanupStack::PopAndDestroy( files ); - } - */ // Hide empty details if no item or memory specific details // can be shown. @@ -3340,12 +3327,17 @@ { aMenuPane.SetItemDimmed( EFileManagerDetails, ETrue ); } - if ( ( drvInfo.iState & TFileManagerDriveInfo::EDriveRemote ) && - !( drvInfo.iState & TFileManagerDriveInfo::EDriveConnected ) ) - { - // Handle disconnected remote drive - dimSend = ETrue; - } + + if ( !( drvInfo.iState & TFileManagerDriveInfo::EDrivePresent ) || + ( ( drvInfo.iState & TFileManagerDriveInfo::EDriveRemote ) && + !( drvInfo.iState & TFileManagerDriveInfo::EDriveConnected ) ) ) + { + // Handle unavailable drive OR disconnected remote drive + dimSend = ETrue; + aMenuPane.SetItemDimmed( EFileManagerSort, ETrue ); + aMenuPane.SetItemDimmed( EFileManagerOrganise, ETrue ); + aMenuPane.SetItemDimmed( EFileManagerMark, ETrue ); + } } else if ( iContainer->ListBoxNumberOfItems() ) { diff -r 6a9f87576119 -r d1daf54a55b5 filemanager/Engine/src/CFileManagerActiveExecute.cpp --- a/filemanager/Engine/src/CFileManagerActiveExecute.cpp Mon Jan 18 20:09:41 2010 +0200 +++ b/filemanager/Engine/src/CFileManagerActiveExecute.cpp Tue Feb 02 00:03:31 2010 +0200 @@ -114,7 +114,7 @@ iItemIterator->CurrentL( &iSrc, &iDst, iItemType ); } - if ( iDst && iDst->Length() > KMaxFileName ) + if ( ( iDst && iDst->Length() > KMaxFileName ) || !iDst ) { error = KErrBadName; TRequestStatus* status = &iStatus; diff -r 6a9f87576119 -r d1daf54a55b5 filemanager/Engine/src/CFileManagerDocHandler.cpp --- a/filemanager/Engine/src/CFileManagerDocHandler.cpp Mon Jan 18 20:09:41 2010 +0200 +++ b/filemanager/Engine/src/CFileManagerDocHandler.cpp Tue Feb 02 00:03:31 2010 +0200 @@ -187,8 +187,14 @@ void CFileManagerDocHandler::OpenShareableFileL( RFile64& aShareableFile, const TDesC8& aMime ) { + // Check if iFileFullPath is NULL + if ( !iFileFullPath ) + { + User::Leave( KErrNotFound ); + } + // Check if file open is denied - if ( iObserver && iFileFullPath ) + if ( iObserver ) { if ( iObserver->NotifyL( MFileManagerProcessObserver::ENotifyFileOpenDenied, diff -r 6a9f87576119 -r d1daf54a55b5 filesystemuis/memstatepopup/src/MSPUtil.cpp --- a/filesystemuis/memstatepopup/src/MSPUtil.cpp Mon Jan 18 20:09:41 2010 +0200 +++ b/filesystemuis/memstatepopup/src/MSPUtil.cpp Tue Feb 02 00:03:31 2010 +0200 @@ -37,7 +37,7 @@ CMSPUtil::~CMSPUtil( ) { - if(!iUnitArray) + if( iUnitArray ) { iUnitArray->Delete( 0, iUnitArray->Count( ) ); }