# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277127615 -10800 # Node ID 57266085a3a2bf5eba806c7a4e3e18a89592cedb # Parent 27dcfaab8b5bede43a0e6d1a66b6e80119b932ea Revision: 201023 Kit: 2010125 diff -r 27dcfaab8b5b -r 57266085a3a2 localconnectivityservice/obexreceiveservices/opp/src/oppcontroller.cpp --- a/localconnectivityservice/obexreceiveservices/opp/src/oppcontroller.cpp Wed Jun 09 10:39:48 2010 +0300 +++ b/localconnectivityservice/obexreceiveservices/opp/src/oppcontroller.cpp Mon Jun 21 16:40:15 2010 +0300 @@ -261,6 +261,17 @@ } iTotalSizeByte = iObexObject->Length(); // get size of receiving file + + if(iObexObject->Name().Length() > KMaxFileName) + { + TRACE_INFO( _L( "[oppreceiveservice] COPPController: PutPacketIndication truncating name of file being received\t" ) ); + TRAPD(err, iObexObject->SetNameL(iObexObject->Name().Left(KMaxFileName))); + if(err != KErrNone) + { + return KErrAccessDenied; + } + } + iReceivingFileName = iObexObject->Name(); // get name of receiving file // Check that capacity is suitable as soon as possible @@ -279,10 +290,7 @@ return KErrDiskFull; } } - if(iObexObject->Name().Length() > KMaxFileName) - { - return KErrAccessDenied; - } + if(iObexTransferState == ETransferPutDiskError) { return KErrDiskFull;