lowlevellibsandfws/pluginfw/Framework/EcomTestUtils/t_makefilewriteable.cpp
changeset 52 bf6a71c50e42
parent 0 e4d67989cc36
child 57 2efc27d87e1c
--- a/lowlevellibsandfws/pluginfw/Framework/EcomTestUtils/t_makefilewriteable.cpp	Fri Jun 11 15:26:22 2010 +0300
+++ b/lowlevellibsandfws/pluginfw/Framework/EcomTestUtils/t_makefilewriteable.cpp	Wed Aug 18 11:27:44 2010 +0300
@@ -25,9 +25,13 @@
 	{
 	// Make sure the file is not read-only
 	RDebug::Print(_L("Open for writing file %S\n"), &aFile);				
-	
+	TInt r = KErrNone;
 	RFs fs;
-	fs.Connect();
+	r = fs.Connect();
+	if (r != KErrNone)
+		{
+			User::Leave(r);
+		}
 	CFileMan* fileMan = CFileMan::NewL(fs);
 	CleanupStack::PushL(fileMan);
 	TInt err = fileMan->Attribs(aFile, 0, KEntryAttReadOnly, TTime(0), 0);