Fix for DB being read only when template is copied from Z: RCL_3
authorSebastian Brannstrom <sebastianb@symbian.org>
Thu, 28 Oct 2010 22:41:44 +0100
branchRCL_3
changeset 300 5902e8f443e2
parent 299 56d23cf60795
child 301 f5af16df2425
Fix for DB being read only when template is copied from Z:
engine/src/PodcastModel.cpp
--- a/engine/src/PodcastModel.cpp	Thu Oct 28 22:27:12 2010 +0100
+++ b/engine/src/PodcastModel.cpp	Thu Oct 28 22:41:44 2010 +0100
@@ -330,6 +330,10 @@
 	DP1("Copy template DB to: %S", &dbFileName);
 	
 	BaflUtils::CopyFile(iFsSession, dbTemplate,dbFileName);
+	
+	// important to set this file to not be read only if copying from Z:
+	iFsSession.SetAtt(dbFileName, 0, KEntryAttReadOnly); 
+	
 	iIsFirstStartup = ETrue;
 	DP("CPodcastModel::ResetDB END");
 	}