Merge pull request #2224 from mfietz/issue/2160-feed-files-pile-up
Remove cached feed file after parsing
This commit is contained in:
commit
8864f51f03
|
@ -842,11 +842,14 @@ 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
|
||||
List<DownloadStatus> log = DBReader.getFeedDownloadLog(feed);
|
||||
|
|
Loading…
Reference in New Issue