voicerecorder/RecViewSrc/CVRMemo.cpp
branchRCL_3
changeset 10 49233e24b2ab
parent 0 845549f293a7
--- a/voicerecorder/RecViewSrc/CVRMemo.cpp	Fri Mar 12 15:43:04 2010 +0200
+++ b/voicerecorder/RecViewSrc/CVRMemo.cpp	Mon Mar 15 12:40:50 2010 +0200
@@ -275,7 +275,30 @@
 		}
 
 #endif
+	
+    TFileName memoNameTemp;  
+    memoNameTemp = memoName;
+    memoNameTemp.Delete(memoName.Length()-1, 1);
 
+    TBool boolTemp = EFalse;
+
+    TInt intTemp = BaflUtils::IsFolder( iFs, memoNameTemp, boolTemp );
+    
+    if( ! boolTemp )
+        {
+        if( BaflUtils::FileExists( iFs, memoNameTemp ) )
+            {
+            if( intTemp != KErrNone )
+            	{
+            	User::LeaveIfError(intTemp);
+            	}
+            else
+            	{
+            	User::LeaveIfError(iFs.Delete( memoNameTemp ));
+            	}
+            }
+        }
+    
 	// Generate unique final file name
     VRUtils::GenerateUniqueFilenameL( iFs, memoName, type );