[jsword-devel] [JIRA] Commented: (JS-128) AbstractSwordInstaller does not delete the temporary download file
Martin Denham (JIRA)
jira at crosswire.org
Wed Nov 24 04:29:35 MST 2010
[ http://www.crosswire.org/bugs/browse/JS-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510#action_13510 ]
Martin Denham commented on JS-128:
----------------------------------
Ah, I have just found the createTempFile and deleteOnExit in NetUtil and I see that if the JVM exits normally these files should be deleted but it would be nice to delete them explicitly after the download has completed in the same way that IndexDownloader.downloadIndex does an explicit deletion immediately after it has finished with a temporary file.
> AbstractSwordInstaller does not delete the temporary download file
> ------------------------------------------------------------------
>
> Key: JS-128
> URL: http://www.crosswire.org/bugs/browse/JS-128
> Project: JSword
> Issue Type: Bug
> Components: o.c.jsword.book.install
> Environment: Android
> Reporter: Martin Denham
> Assignee: DM Smith
>
> Maybe I am doing something wrong but I was having a lot of temporary swd files left on my Android sdcard so I think the temp file should be deleted in a finally block in AbstractSwordInstaller.run()
> + URI temp = null;
> try {
> // main code skipped
> } finally {
> job.done();
> + // tidy up after ourselves
> + if (temp != null) {
> + try {
> + NetUtil.delete(temp);
> + } catch (Exception e) {
> + log.warn("Error deleting temp download file:"+e.getMessage());
> + }
> + }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://www.crosswire.org/bugs/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jsword-devel
mailing list