Changeset 673 for AE/installer2/src/net/oni2/aeinstaller/backend
- Timestamp:
- Feb 25, 2013, 5:52:49 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/packages/unpack/Unpacker.java
r648 r673 119 119 120 120 zf = new ZipFile(zip); 121 121 122 122 if (target.exists()) 123 123 FileUtils.deleteDirectory(target); … … 145 145 if (!ze.isDirectory()) { 146 146 if (ze.getName().startsWith(pathStartName)) { 147 File targetFile = new File(target, ze 148 .getName().substring(pathStart)); 149 File parent = targetFile.getParentFile(); 150 parent.mkdirs(); 147 if (!(ze.getName().endsWith("aei.cfg") || ze 148 .getName().endsWith(".DS_Store"))) { 149 File targetFile = new File(target, ze 150 .getName().substring(pathStart)); 151 File parent = targetFile 152 .getParentFile(); 153 parent.mkdirs(); 151 154 152 InputStream in = zf.getInputStream(ze);155 InputStream in = zf.getInputStream(ze); 153 156 154 int read = 0; 155 byte[] data = new byte[1024]; 156 FileOutputStream fileOut = new FileOutputStream( 157 targetFile); 158 while ((read = in.read(data, 0, 1024)) != -1) { 159 fileOut.write(data, 0, read); 157 int read = 0; 158 byte[] data = new byte[1024]; 159 FileOutputStream fileOut = new FileOutputStream( 160 targetFile); 161 while ((read = in.read(data, 0, 1024)) != -1) { 162 fileOut.write(data, 0, read); 163 } 164 fileOut.close(); 160 165 } 161 fileOut.close();162 166 } 163 167 }
Note:
See TracChangeset
for help on using the changeset viewer.