hti/HtiServicePlugins/HtiFtpServicePlugin/src/HtiFtpServicePlugin.cpp
branchRCL_3
changeset 16 8f8df8006c40
parent 4 73ff0d268e1d
child 18 3406c99bc375
equal deleted inserted replaced
14:a9c038d69df8 16:8f8df8006c40
   680 
   680 
   681     TInt newNamePos = originalLenngth + 2 ;
   681     TInt newNamePos = originalLenngth + 2 ;
   682     TInt newNameLength = aMessage[newNamePos];
   682     TInt newNameLength = aMessage[newNamePos];
   683     GetFileNameL( aMessage.Mid( newNamePos, newNameLength + 1 ), aUnicode );
   683     GetFileNameL( aMessage.Mid( newNamePos, newNameLength + 1 ), aUnicode );
   684 
   684 
       
   685     TInt msglen = aMessage.Length();
       
   686     TInt recurse = 1;
       
   687     if(msglen>originalLenngth+newNameLength+3)        
       
   688         {
       
   689         recurse = aMessage[newNamePos+1+newNameLength];
       
   690         }
       
   691     
       
   692     TInt err=0;
   685     if ( IsFileTcb( origName ) || IsFileTcb( iFileName ) )
   693     if ( IsFileTcb( origName ) || IsFileTcb( iFileName ) )
   686         {
   694         {
   687         HandleTcbCopyL( origName, iFileName );
   695         HandleTcbCopyL( origName, iFileName );
   688         }
   696         }
   689     else{
   697     else{
   690         iHandlerAO = new ( ELeave ) CFtpHandlerAO( this );
   698         iHandlerAO = new ( ELeave ) CFtpHandlerAO( this );
   691         TInt err = iFileMan->Copy( origName, iFileName,
   699         
       
   700         if (recurse)
       
   701             {
       
   702             err = iFileMan->Copy( origName, iFileName,
   692                 ( CFileMan::EOverWrite | CFileMan::ERecurse ),
   703                 ( CFileMan::EOverWrite | CFileMan::ERecurse ),
   693                 iHandlerAO->iStatus );
   704                 iHandlerAO->iStatus );
       
   705             }
       
   706         else
       
   707             {
       
   708             err = iFileMan->Copy( origName, iFileName,
       
   709                 ( CFileMan::EOverWrite ),
       
   710                 iHandlerAO->iStatus );
       
   711             }
   694 
   712 
   695         if ( err == KErrNone)
   713         if ( err == KErrNone)
   696             {
   714             {
   697             iState = ECopyBusy;
   715             iState = ECopyBusy;
   698             iHandlerAO->Start();
   716             iHandlerAO->Start();