Changeset 17897
- Timestamp:
- 2008-11-20T10:51:46+13:00 (15 years ago)
- Location:
- release-kits/shared/ant-installer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/shared/ant-installer/src/org/tp23/antinstaller/selfextract/SelfExtractor.java
r15311 r17897 73 73 //String fileForm = jarUrl.getFile(); 74 74 75 76 /* 77 File file = new File( fileForm ); 78 if ( !file.exists() ) { 79 throw new RuntimeException( "Failed expanding Jar.\n File: '" + file.getAbsolutePath() + "'\nString: '" + stringForm + "'" ); 80 } 81 return file; 82 */ 83 75 84 File file = null; 76 85 int endIdx = stringForm.indexOf("!/"); 77 if(endIdx != -1){ 78 String unescaped = null; 79 String fileNamePart = stringForm.substring("jar:file:".length(), endIdx); 80 file = new File(fileNamePart); 81 if ( ! file.exists()) { 82 // try to unescape encase the URL Handler has escaped the " " to %20 83 unescaped = unescape(fileNamePart); 84 file = new File(unescaped); 85 } 86 return file; 87 } 88 throw new RuntimeException("Failed expanding Jar."); 86 if( endIdx == -1 ) { 87 throw new RuntimeException("Failed expanding Jar."); 88 } 89 String unescaped = null; 90 String fileNamePart = stringForm.substring("jar:file:".length(), endIdx); 91 file = new File(fileNamePart); 92 file = new File( file.getName() ); 93 94 /* 95 if ( !file.exists()) { 96 // try to unescape encase the URL Handler has escaped the " " to %20 97 unescaped = unescape(fileNamePart); 98 file = new File(unescaped); 99 } 100 */ 101 return file; 102 89 103 } 90 104
Note:
See TracChangeset
for help on using the changeset viewer.