Skip to content

Commit

Permalink
Unzip method now returns the absolute path of the parent directory
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcherclough committed Apr 23, 2020
1 parent 6c0adcf commit ebc5229
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private static void dirToZip(File rootDir, String sourceDir, ZipOutputStream out
*/
public static String unzip(String zipFileName) throws IOException {
ZipFile zipFile = new ZipFile(zipFileName);
String outputDir = new File(zipFileName).getParent();
String outputDir = new File(zipFileName).getParentFile().getAbsolutePath();
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = entries.nextElement();
Expand Down

0 comments on commit ebc5229

Please sign in to comment.