Remove cached feed file after parsing

This commit is contained in:
Martin Fietz 2016-12-31 16:36:23 +01:00
parent 1a58d6f2a8
commit a8539dde84

View File

@ -842,10 +842,13 @@ public class DownloadService extends Service {
successful = false;
reason = DownloadError.ERROR_PARSER_EXCEPTION;
reasonDetailed = e.getMessage();
} finally {
File feedFile = new File(request.getDestination());
if(feedFile.exists()) {
boolean deleted = feedFile.delete();
Log.d(TAG, "Deletion of file '" + feedFile.getAbsolutePath() + "' " + (deleted ? "successful" : "FAILED"));
}
}
// cleanup();
if (successful) {
// we create a 'successful' download log if the feed's last refresh failed