diff -r f85613f12947 -r dbd1c5e08735 mtpfws/mtpfw/datatypes/src/cmtptypeobjectproplist.cpp --- a/mtpfws/mtpfw/datatypes/src/cmtptypeobjectproplist.cpp Mon Jun 21 16:36:59 2010 +0300 +++ b/mtpfws/mtpfw/datatypes/src/cmtptypeobjectproplist.cpp Thu Jul 15 19:35:12 2010 +0300 @@ -609,9 +609,27 @@ { User::Leave(KErrArgument); } - TUint16 retValue; - GetValueL(&retValue, sizeof(TUint16)); - return retValue; + + //Workaround for partial deletion issue observed on Windows XP/Windows7. + //When send an object from PC to device through Windows explorer, it will + //include the 'ProtectionStatus' property in the dataset of 'SendObjectPropList' + //command. While syncing through Ovi player or Windows Media Player, this property + //will not be included. + //When we delete a folder which contains read-only objects,we returns partial + //deletion code, because read-only object should not be deleted according to MTP spec. + //On receiving this,Windows popup a dialog saying 'device stops response', this really + //give user bad experience, to prevent this, we make this workaround here: when dataprovider + //query value of 'ProtectionStatus' property,always return EMTPProtectionNoProtection(0x0000). + if (EMTPObjectPropCodeProtectionStatus == iPropertyCode) + { + return EMTPProtectionNoProtection; + } + else + { + TUint16 retValue; + GetValueL(&retValue, sizeof(TUint16)); + return retValue; + } default: User::Leave(KErrArgument); }