[jsword-devel] [JIRA] Commented: (JS-128) AbstractSwordInstaller does not delete the temporary download file

DM Smith (JIRA) jira at crosswire.org
Tue Nov 23 16:20:38 MST 2010


    [ http://www.crosswire.org/bugs/browse/JS-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503#action_13503 ] 

DM Smith commented on JS-128:
-----------------------------

Yes. These should be deleted. JSword uses a Java mechanism that marks created temporary files for delete upon exit. Maybe that doesn't work in an Android environment.

> 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