--- a/coreapplicationuis/rfsplugins/FormatterRFSPlugin/src/formatterrfsplugin.cpp Mon Mar 15 12:41:10 2010 +0200
+++ b/coreapplicationuis/rfsplugins/FormatterRFSPlugin/src/formatterrfsplugin.cpp Wed Mar 31 21:49:52 2010 +0300
@@ -48,12 +48,13 @@
RFile file;
User::LeaveIfError(fileSession.Connect());
TInt err = file.Open(fileSession,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite|EFileStreamText);
-
+
if ( err != KErrNone )
{
RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL , FileWrite : Failed to open the file"));
return;
}
+
TInt pos = 0;
file.Seek(ESeekEnd,pos);
TInt size = files.Count();
@@ -74,6 +75,7 @@
CleanupStack::PopAndDestroy();//Filename
file.Flush();
}
+
file.Close();
fileSession.Close();
}
@@ -93,14 +95,20 @@
User::LeaveIfError(fileSession.Connect());
TInt ret = excludeFileName.Open(fileSession,_L("c:\\private\\100059C9\\excludelist.txt"),EFileRead);
- TInt err1 = fileName.Open(fileSession,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite|EFileStreamText);
-
- fileName.Seek(ESeekEnd,pos);
- if ( ret != KErrNone || err1 != KErrNone)
+ if(ret != KErrNone)
+ {
+ RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL , MergeFiles : Failed to open the file"));
+ return;
+ }
+ ret = fileName.Open(fileSession,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite|EFileStreamText);
+ if ( ret != KErrNone)
{
+ excludeFileName.Close();
RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL , MergeFiles : Failed to open the file"));
return;
}
+ fileName.Seek(ESeekEnd,pos);
+
HBufC* buffer = HBufC::NewMaxLC( buffer_size );
TPtr8 bufferPtr( (TUint8*)buffer->Ptr(), buffer_size);
@@ -154,7 +162,7 @@
file.Flush();
file.Close();
fileSession.Close();
-
+ dir.Close();
Swi::RSisRegistrySession session;
CleanupClosePushL(session);
User::LeaveIfError(session.Connect());