commonuis/CommonUi/src/DocumentHandler.cpp
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 10 9f56a4e1b8ab
child 51 fcdfafb36fe7
--- a/commonuis/CommonUi/src/DocumentHandler.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/commonuis/CommonUi/src/DocumentHandler.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -1393,26 +1393,19 @@
         CloseSharableFS();
         User::LeaveIfError(iSharableFS.Connect());
         User::LeaveIfError(iSharableFS.ShareProtected());
-        TInt err = aSharableFile.Open(iSharableFS,aFileName,EFileShareReadersOnly);
-        if (err == KErrInUse)
-            {
-            err = aSharableFile.Open( iSharableFS,aFileName,EFileShareReadersOrWriters );
-            }
-        else if ( err == KErrTooBig )
-        	{
-			RFile64* file64 = NULL;
-			file64 = static_cast<RFile64*> (&aSharableFile);
-			if( file64 != NULL )
-				{
-				err = file64->Open(iSharableFS,aFileName,EFileShareReadersOnly);
-				if( err == KErrInUse )
-					{
-                    err = aSharableFile.Open( iSharableFS,aFileName,EFileShareReadersOrWriters );
-					}
-				}
-        	}
-        error = err; // Otherwise possible KErrNotReady caused by hotswap leads to crash later           
-        }
+
+		error = aSharableFile.Open( iSharableFS, aFileName, EFileShareReadersOrWriters );
+        if( error == KErrTooBig )
+			{
+		    RFile64* file64 = NULL;
+		    file64 = static_cast<RFile64*> (&aSharableFile);
+		    if( file64 != NULL )
+			    {
+			    error = file64->Open( iSharableFS, aFileName, EFileShareReadersOrWriters );
+			    }
+			}
+		}
+    
     #ifdef _DEBUG
     RDebug::Print( _L("DocumentHandler: CDocumentHandler::OpenTempFileL: finished with error=%d."), error);
     #endif