--- 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 )
--- 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() )
{
--- 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;
--- 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,
--- 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( ) );
}