@@ -158,31 +158,7 @@ public boolean isExisting()
158158 protected void execute ()
159159 throws ArchiverException
160160 {
161- getLogger ().debug ( "Expanding: " + getSourceFile () + " into " + getDestDirectory () );
162- try ( ZipFile zf = new ZipFile ( getSourceFile (), encoding , true ) )
163- {
164- final Enumeration <ZipArchiveEntry > e = zf .getEntriesInPhysicalOrder ();
165- while ( e .hasMoreElements () )
166- {
167- final ZipArchiveEntry ze = e .nextElement ();
168- final ZipEntryFileInfo fileInfo = new ZipEntryFileInfo ( zf , ze );
169- if ( isSelected ( fileInfo .getName (), fileInfo ) )
170- {
171- try ( InputStream in = zf .getInputStream ( ze ) )
172- {
173- extractFile ( getSourceFile (), getDestDirectory (), in , fileInfo .getName (),
174- new Date ( ze .getTime () ), ze .isDirectory (),
175- ze .getUnixMode () != 0 ? ze .getUnixMode () : null ,
176- resolveSymlink ( zf , ze ), getFileMappers () );
177- }
178- }
179- }
180- getLogger ().debug ( "expand complete" );
181- }
182- catch ( final IOException ioe )
183- {
184- throw new ArchiverException ( "Error while expanding " + getSourceFile ().getAbsolutePath (), ioe );
185- }
161+ execute ( "" , getDestDirectory () );
186162 }
187163
188164 private String resolveSymlink ( ZipFile zf , ZipArchiveEntry ze )
@@ -202,6 +178,7 @@ private String resolveSymlink( ZipFile zf, ZipArchiveEntry ze )
202178 protected void execute ( final String path , final File outputDirectory )
203179 throws ArchiverException
204180 {
181+ getLogger ().debug ( "Expanding: " + getSourceFile () + " into " + outputDirectory );
205182 try ( ZipFile zipFile = new ZipFile ( getSourceFile (), encoding , true ) )
206183 {
207184 final Enumeration <ZipArchiveEntry > e = zipFile .getEntriesInPhysicalOrder ();
@@ -226,6 +203,7 @@ protected void execute( final String path, final File outputDirectory )
226203 }
227204 }
228205 }
206+ getLogger ().debug ( "expand complete" );
229207 }
230208 catch ( final IOException ioe )
231209 {
0 commit comments