hti/HtiServicePlugins/HtiFtpServicePlugin/src/HtiFtpServicePlugin.cpp
changeset 25 9aaae25af322
parent 13 33016869e0dd
child 30 86a2e675b80a
--- a/hti/HtiServicePlugins/HtiFtpServicePlugin/src/HtiFtpServicePlugin.cpp	Tue May 25 18:01:01 2010 +0300
+++ b/hti/HtiServicePlugins/HtiFtpServicePlugin/src/HtiFtpServicePlugin.cpp	Mon Jun 14 11:37:33 2010 +0300
@@ -682,15 +682,33 @@
     TInt newNameLength = aMessage[newNamePos];
     GetFileNameL( aMessage.Mid( newNamePos, newNameLength + 1 ), aUnicode );
 
+    TInt msglen = aMessage.Length();
+    TInt recurse = 1;
+    if(msglen>originalLenngth+newNameLength+3)        
+        {
+        recurse = aMessage[newNamePos+1+newNameLength];
+        }
+    
+    TInt err=0;
     if ( IsFileTcb( origName ) || IsFileTcb( iFileName ) )
         {
         HandleTcbCopyL( origName, iFileName );
         }
     else{
         iHandlerAO = new ( ELeave ) CFtpHandlerAO( this );
-        TInt err = iFileMan->Copy( origName, iFileName,
+        
+        if (recurse)
+            {
+            err = iFileMan->Copy( origName, iFileName,
                 ( CFileMan::EOverWrite | CFileMan::ERecurse ),
                 iHandlerAO->iStatus );
+            }
+        else
+            {
+            err = iFileMan->Copy( origName, iFileName,
+                ( CFileMan::EOverWrite ),
+                iHandlerAO->iStatus );
+            }
 
         if ( err == KErrNone)
             {