package org.jvnet.hudson.plugins.backup.utils.compress;

import java.io.File;
import java.io.IOException;
import java.util.logging.Logger;

import org.apache.commons.io.FileUtils;
import org.jvnet.hudson.plugins.backup.utils.BackupTask;

public class ZipUnArchiver implements UnArchiver {
    protected final static Logger LOGGER = Logger.getLogger(BackupTask.class
            .getName());

	public void unArchive(File archive, String toDir) throws ArchiverException {
		org.codehaus.plexus.archiver.zip.ZipUnArchiver unarchiver =
			new org.codehaus.plexus.archiver.zip.ZipUnArchiver(archive);
		File destDir = new File(toDir);
		
		if (!destDir.exists()) {
			try {
				FileUtils.forceMkdir(destDir);
			} catch (IOException e) {
				String message = "Unable to created directory " + destDir.getAbsolutePath(); 
				LOGGER.severe(message);
				throw new ArchiverException(message, e);
					
			}
		}
		
		unarchiver.setDestDirectory(destDir);
	}

}

@@ -583,17 +583,13 @@
 ver(
-archive);
+);%0A%09%09
 %0A%09%09F
@@ -895,16 +895,53 @@
 %0A%09%09%7D%0A%09%09%0A
+%09%09unarchiver.setSourceFile(archive);%0A
 %09%09unarch
@@ -972,14 +972,17 @@
 stDir);%0A
+%09%09%0A
 %09%7D%0A%0A%7D%0A

change constructor call to archiver