diff -r aabe5387f5ce -r 1b39655331a3 mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectinfo.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectinfo.cpp Fri Mar 19 09:40:39 2010 +0200 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectinfo.cpp Fri Apr 16 15:51:48 2010 +0300 @@ -23,6 +23,9 @@ #include "cmtpgetobjectinfo.h" #include "mtpdppanic.h" +#include "cmtpfsentrycache.h" + +__FLOG_STMT(_LIT8(KComponent,"MTPGetObjectInfo");) /** Verification data for GetObjectInfo request @@ -55,6 +58,7 @@ { delete iObjectInfoToBuild; iDpSingletons.Close(); + __FLOG_CLOSE; } /** @@ -65,6 +69,7 @@ :CMTPRequestProcessor(aFramework, aConnection, sizeof(KMTPGetObjectInfoPolicy)/sizeof(TMTPRequestElementInfo), KMTPGetObjectInfoPolicy), iRfs(aFramework.Fs()) { + __FLOG_OPEN(KMTPSubsystem, KComponent); } /** @@ -97,7 +102,29 @@ __ASSERT_DEBUG(objectInfoFromStore, Panic(EMTPDpObjectNull)); TEntry fileEntry; - User::LeaveIfError(iRfs.Entry(objectInfoFromStore->DesC(CMTPObjectMetaData::ESuid), fileEntry)); + TInt err = iRfs.Entry(objectInfoFromStore->DesC(CMTPObjectMetaData::ESuid), fileEntry); + + if ( err != KErrNone ) + { + if( (iDpSingletons.CopyingBigFileCache().TargetHandle() == objectHandle) && + (iDpSingletons.CopyingBigFileCache().IsOnGoing())) + { + // The object is being copied, it is not created in fs yet. Use its cache entry to get objectinfo + __FLOG(_L8("BuildObjectInfoL - The object is being copied, use its cache entry to get objectinfo")); + fileEntry = iDpSingletons.CopyingBigFileCache().FileEntry(); + err = KErrNone; + } + else if( (iDpSingletons.MovingBigFileCache().TargetHandle() == objectHandle) && + (iDpSingletons.MovingBigFileCache().IsOnGoing())) + { + // The object is being moved, it is not created in fs yet. Use its cache entry to get objectinfo + __FLOG(_L8("BuildObjectInfoL - The object is being moved, use its cache entry to get objectinfo")); + fileEntry = iDpSingletons.MovingBigFileCache().FileEntry(); + err = KErrNone; + } + } + + User::LeaveIfError(err); //1. storage id iObjectInfoToBuild->SetUint32L(CMTPTypeObjectInfo::EStorageID, objectInfoFromStore->Uint(CMTPObjectMetaData::EStorageId));