# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1284541148 -10800 # Node ID a7ccb69868af1de1813d6a84a4ec682538cc4444 # Parent cbffe13eac635e48951d70cd3331249ef01a42a8 Revision: 201035 Kit: 201036 diff -r cbffe13eac63 -r a7ccb69868af csxhelp/HelpEngine/src/CSXHRuntimeIndexing.cpp --- a/csxhelp/HelpEngine/src/CSXHRuntimeIndexing.cpp Wed Sep 01 12:30:56 2010 +0100 +++ b/csxhelp/HelpEngine/src/CSXHRuntimeIndexing.cpp Wed Sep 15 11:59:08 2010 +0300 @@ -132,7 +132,12 @@ // rename to index.xml. otherwise, the old index file still exists. // des.Append( KMasterMetaTmpFile ); - iFile.Replace( fileSession, des, EFileWrite ); + TInt err = KErrNone; + err = iFile.Replace( fileSession, des, EFileWrite ); + if ( KErrNone != err || 0 == iFile.SubSessionHandle() ) + { + return; + } HBufC8* driveInfo = HBufC8::NewLC( KMaxDriveInfo ); TPtr8 ptr = driveInfo->Des(); @@ -146,6 +151,10 @@ void CCSXHRuntimeIndexing::FinishAndCloseIndexFileL() { + if ( 0 == iFile.SubSessionHandle() ) + { + return; + } RFs& fileSession = iCoeEnv->FsSession(); iFile.Write( KIndexCollectEnd ); iFile.Close(); @@ -186,6 +195,10 @@ void CCSXHRuntimeIndexing::RuntimeGenerateIndexL( const CCSXHHtmlTOC1& aToc1, const TDesC& aFeature ) { + if ( 0 == iFile.SubSessionHandle() ) + { + return; + } // Form into an entry, like // HBufC8* appName = CnvUtfConverter::ConvertFromUnicodeToUtf8L( aToc1.GetName() );