diff -r 00439341df81 -r 13ecdfc9a581 omads/omadsextensions/adapters/notes/src/NSmlNotepadDataStore.cpp --- a/omads/omadsextensions/adapters/notes/src/NSmlNotepadDataStore.cpp Fri Aug 20 09:35:25 2010 +0530 +++ b/omads/omadsextensions/adapters/notes/src/NSmlNotepadDataStore.cpp Fri Sep 03 17:34:04 2010 +0530 @@ -698,24 +698,24 @@ { _NOTEPAD_DBG_FILE("CNSmlNotepadDataStore::DoWriteItemL(): begin"); if ( iState == ENSmlItemCreating || iState == ENSmlItemUpdating ) - { - TInt totalSize = aData.Size() + iItemData->Size(); - if( SysUtil::DiskSpaceBelowCriticalLevelL( &iRfs, totalSize, iDrive ) ) - { - User::RequestComplete(iCallerStatus, KErrDiskFull); - return; - } + { if ( iItemData ) - { - if ( iWriterPosition == -1 ) - { + { + TInt totalSize = aData.Size() + iItemData->Size(); + if( SysUtil::DiskSpaceBelowCriticalLevelL( &iRfs, totalSize, iDrive ) ) + { + User::RequestComplete(iCallerStatus, KErrDiskFull); + return; + } + if ( iWriterPosition == -1 ) + { User::Leave( KErrEof ); - } - iItemData->InsertL( iWriterPosition , aData ); - iWriterPosition = aData.Size(); - return; - } + } + iItemData->InsertL( iWriterPosition , aData ); + iWriterPosition = aData.Size(); + return; } + } User::Leave( KErrNotReady ); _NOTEPAD_DBG_FILE("CNSmlNotepadDataStore::DoWriteItemL(): end"); }