Skip to main content

[truezip-issues] [JIRA] Commented: (TRUEZIP-321) TrueZip does not detect sub archives when Java's temp directory does not exist

  • From: "Christian Schlichtherle (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [truezip-issues] [JIRA] Commented: (TRUEZIP-321) TrueZip does not detect sub archives when Java's temp directory does not exist
  • Date: Thu, 13 Jun 2013 10:16:09 +0000 (UTC)
  • Auto-submitted: auto-generated


    [ 
https://java.net/jira/browse/TRUEZIP-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=365364#action_365364
 ] 

Christian Schlichtherle commented on TRUEZIP-321:
-------------------------------------------------

What I could do is to respond to the IOException with a check if the temp dir 
exists. If not, then create the temp dir and retry to create the temp file. 
Otherwise, or if this fails, simply throw a new AssertionError().

When applied to your case, this strategy would solve the issue by silently 
creating the temp dir. Only if this impossible, you would get an 
AssertionError. Throwing the AssertionError is a good thing because if the 
issue can't get resolved, then continuing the program is pretty much 
pointless because temp files are used at several places.

> TrueZip does not detect sub archives when Java's temp directory does not 
> exist
> ------------------------------------------------------------------------------
>
>                 Key: TRUEZIP-321
>                 URL: https://java.net/jira/browse/TRUEZIP-321
>             Project: TrueZIP
>          Issue Type: Bug
>          Components: TrueZIP Driver FILE, TrueZIP Kernel
>    Affects Versions: TrueZIP 7.7, TrueZIP 7.7.2
>         Environment: Windows 7, 32 or 64 Bit, Java 1.6.0_26-32bit
>            Reporter: palich
>            Assignee: Christian Schlichtherle
>            Priority: Minor
>
> If the system property {{java.io.tmpdir}} refers to a non-existing 
> directory, TrueZip is not able to detect or access sub archives.
> The assertion from the following test excerpt fails:
> {code}
> System.setProperty("java.io.tmpdir", "target/temp");
> TFile subArchive = new TFile("src/test/resources/archive.zip/files.zip");
> assertTrue("File must act like a directory: " + subArchive, 
> file.isDirectory());
> {code}
> I know that {{java.io.tmpdir}} should always exist. But the real world 
> sometimes is different. At least TrueZip should test it and log a warning 
> to the console. Otherwise, the reason for a failed archive detection is 
> hard to find.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[truezip-issues] [JIRA] Created: (TRUEZIP-321) TrueZip does not detect sub archives when Java's temp directory does not exist

palich (JIRA) 06/06/2013

[truezip-issues] [JIRA] Commented: (TRUEZIP-321) TrueZip does not detect sub archives when Java's temp directory does not exist

palich (JIRA) 06/06/2013

[truezip-issues] [JIRA] Updated: (TRUEZIP-321) TrueZip does not detect sub archives when Java's temp directory does not exist

Christian Schlichtherle (JIRA) 06/06/2013

[truezip-issues] [JIRA] Updated: (TRUEZIP-321) TrueZip does not detect sub archives when Java's temp directory does not exist

Christian Schlichtherle (JIRA) 06/06/2013

[truezip-issues] [JIRA] Commented: (TRUEZIP-321) TrueZip does not detect sub archives when Java's temp directory does not exist

Christian Schlichtherle (JIRA) 06/07/2013

[truezip-issues] [JIRA] Commented: (TRUEZIP-321) TrueZip does not detect sub archives when Java's temp directory does not exist

Christian Schlichtherle (JIRA) 06/13/2013

[truezip-issues] [JIRA] Commented: (TRUEZIP-321) TrueZip does not detect sub archives when Java's temp directory does not exist

palich (JIRA) 06/20/2013

[truezip-issues] [JIRA] Updated: (TRUEZIP-321) TrueZip does not detect sub archives when Java's temp directory does not exist

Christian Schlichtherle (JIRA) 06/25/2013
 
 
Close
loading
Please Confirm
Close