omads/omadsextensions/adapters/notes/src/NSmlNotepadDataStore.cpp
changeset 54 13ecdfc9a581
parent 38 1bb40c16ad33
child 64 a62b67d1f67c
--- 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");
 	}