diff -r 6aee962f6139 -r 49233e24b2ab voicerecorder/RecViewSrc/CVRMemo.cpp --- 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 );