diff -r d39add9822e2 -r 5bfc169077b2 codhandler/codeng/src/CodEngBase.cpp --- a/codhandler/codeng/src/CodEngBase.cpp Tue Feb 02 00:56:45 2010 +0200 +++ b/codhandler/codeng/src/CodEngBase.cpp Fri Mar 19 09:52:28 2010 +0200 @@ -17,6 +17,7 @@ * */ + // INCLUDE FILES #include "CodEngBase.h" @@ -43,15 +44,15 @@ #include #include #include -#include +#include #include #include #include "CodDefs.h" #include #include #include -#include -#include "FileExt.h" +#include +#include "FileExt.h" #ifdef __SYNCML_DM_FOTA #include @@ -65,7 +66,7 @@ #ifdef RD_MULTIPLE_DRIVE #include #include -#include +#include #endif //RD_MULTIPLE_DRIVE #include @@ -482,7 +483,7 @@ // EXPORT_C TBool CCodEngBase::RemovableMedia() const { - return ( KDriveAttRemovable == iRemovableMediaStatus ) ? ETrue : EFalse ; + return iRemovableMedia; } // --------------------------------------------------------- @@ -580,7 +581,7 @@ iPhoneMemoryOk( EFalse ), iMmcOk( EFalse ), #endif - iRemovableMediaStatus( KDriveAttLocal ), + iRemovableMedia( EFalse ), iStatusCode( KHttp902UserCancelled ), iResult( KErrGeneral ), iContentTypeCheck ( EFalse ), @@ -2008,39 +2009,16 @@ (*iData)[iData->ActiveDownload()]->iTempPath.Append(rootPath.Drive()); (*iData)[iData->ActiveDownload()]->iTempPath.Append(tempBuf); - + TDriveInfo info; TDriveUnit unit( rootPath.Drive() ); - -#ifdef RD_MULTIPLE_DRIVE - TUint aStatus ; - - if( KErrNone == DriveInfo::GetDriveStatus( iFs, unit , aStatus )) - { - iRemovableMediaStatus = (aStatus & DriveInfo::EDriveExternallyMountable) ? aStatus : 0 ; - if( iRemovableMediaStatus ) - { - iRemovableMediaStatus = (aStatus & DriveInfo::EDriveRemovable) ? KDriveAttRemovable : KDriveAttInternal ; - } - else - { - iRemovableMediaStatus = KDriveAttLocal ; - } - } -#else - TDriveInfo info; - User::LeaveIfError( iFs.Drive( info, unit ) ); + User::LeaveIfError( iFs.Drive( info, unit ) ); + // Create the temp directory earlier in case it's not created yet + iFs.MkDirAll( (*iData)[iData->ActiveDownload()]->iTempPath ); if ( info.iDriveAtt & KDriveAttRemovable ) { - iRemovableMediaStatus = KDriveAttRemovable; + iRemovableMedia = ETrue; } - else - { - iRemovableMediaStatus = KDriveAttLocal; - } -#endif - // Create the temp directory earlier in case it's not created yet - iFs.MkDirAll( (*iData)[iData->ActiveDownload()]->iTempPath ); - + CLOG(( ECodEng, 2, _L("<- CCodEngBase::SetPathsL root<%S> temp<%S>"), \ &(*iData)[iData->ActiveDownload()]->iRootPath, &(*iData)[iData->ActiveDownload()]->iTempPath )); } @@ -2061,8 +2039,7 @@ #endif //(*iData)[iData->ActiveDownload()]->iTempPath = KNullDesC; //(*iData)[iData->ActiveDownload()]->iRootPath = KNullDesC; - - iRemovableMediaStatus = KDriveAttLocal; + iRemovableMedia = EFalse; } #ifdef RD_MULTIPLE_DRIVE