# HG changeset patch # User teknolog # Date 1270336917 -3600 # Node ID 554d9980157fee87021a7a34f5cc9a26a3bcfc7f # Parent af6475fdf8d626c783170793e27007fe30903893 Moved temporary feed parser files to subdirectory under private dir, and added cleanup of this directory on startup. diff -r af6475fdf8d6 -r 554d9980157f engine/src/FeedEngine.cpp --- a/engine/src/FeedEngine.cpp Sat Apr 03 21:28:44 2010 +0100 +++ b/engine/src/FeedEngine.cpp Sun Apr 04 00:21:57 2010 +0100 @@ -27,6 +27,7 @@ #include "PodcastUtils.h" #include +_LIT(KFeedParseStorePath, "feeds\\"); // Cleanup stack macro for SQLite3 // TODO Move this to some common place. static void Cleanup_sqlite3_finalize_wrapper(TAny* handle) @@ -66,6 +67,15 @@ if (BaflUtils::FileExists(iPodcastModel.FsSession(), defaultFile)) { ImportFeedsL(defaultFile); } + } else { + // clean out feeds temp directory + TFileName feedTempPath; + feedTempPath.Copy (iPodcastModel.SettingsEngine().PrivatePath ()); + feedTempPath.Append(KFeedParseStorePath); + feedTempPath.Append(_L("*")); + + BaflUtils::EnsurePathExistsL(iPodcastModel.FsSession(), feedTempPath); + BaflUtils::DeleteFile(iPodcastModel.FsSession(),feedTempPath); } TFileName importFile = iPodcastModel.SettingsEngine().ImportFeedsFileName(); @@ -229,6 +239,9 @@ DBUpdateFeedL(*iActiveFeed); iUpdatingFeedFileName.Copy (iPodcastModel.SettingsEngine().PrivatePath ()); + iUpdatingFeedFileName.Append(KFeedParseStorePath); + BaflUtils::EnsurePathExistsL(iPodcastModel.FsSession(), iUpdatingFeedFileName); + _LIT(KFileNameFormat, "%lu.xml"); iUpdatingFeedFileName.AppendFormat(KFileNameFormat, aFeedUid);