308 if (BaflUtils::FileExists(iFsSession, dbFileName)) |
309 if (BaflUtils::FileExists(iFsSession, dbFileName)) |
309 { |
310 { |
310 BaflUtils::DeleteFile(iFsSession, dbFileName); |
311 BaflUtils::DeleteFile(iFsSession, dbFileName); |
311 } |
312 } |
312 |
313 |
|
314 #ifdef ENABLE_MPX_INTEGRATION |
313 // copy template to new DB |
315 // copy template to new DB |
314 TFileName dbTemplate; |
316 TFileName dbTemplate; |
315 TFileName temp; |
317 TFileName temp; |
316 dbTemplate.Copy(_L("z:")); |
318 dbTemplate.Copy(_L("z:")); |
317 temp.Copy(iSettingsEngine->PrivatePath()); |
319 temp.Copy(iSettingsEngine->PrivatePath()); |
318 dbTemplate.Append(temp); |
320 dbTemplate.Append(temp); |
319 dbTemplate.Append(KDBTemplateFileName); |
321 dbTemplate.Append(KDBTemplateFileName); |
|
322 # else |
|
323 // copy template to new DB |
|
324 TFileName dbTemplate; |
|
325 dbTemplate.Copy(iSettingsEngine->PrivatePath()); |
|
326 dbTemplate.Append(KDBTemplateFileName); |
|
327 #endif |
320 |
328 |
321 DP1("Copy template DB from: %S", &dbTemplate); |
329 DP1("Copy template DB from: %S", &dbTemplate); |
322 DP1("Copy template DB to: %S", &dbFileName); |
330 DP1("Copy template DB to: %S", &dbFileName); |
323 |
331 |
324 BaflUtils::CopyFile(iFsSession, dbTemplate,dbFileName); |
332 BaflUtils::CopyFile(iFsSession, dbTemplate,dbFileName); |
338 } |
346 } |
339 |
347 |
340 TFileName dbFileName; |
348 TFileName dbFileName; |
341 dbFileName.Copy(iSettingsEngine->PrivatePath()); |
349 dbFileName.Copy(iSettingsEngine->PrivatePath()); |
342 dbFileName.Append(KDBFileName); |
350 dbFileName.Append(KDBFileName); |
343 |
351 |
|
352 DP1("dbFileName=%S", &dbFileName); |
344 if (!BaflUtils::FileExists(iFsSession, dbFileName)) |
353 if (!BaflUtils::FileExists(iFsSession, dbFileName)) |
345 { |
354 { |
346 User::Leave(KErrNotFound); |
355 User::Leave(KErrNotFound); |
347 } |
356 } |
348 |
357 |