Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
renamed variable for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
devang-gaur authored and manusa committed Mar 11, 2020
1 parent 8cc4f6e commit 61b0a92
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,19 +239,18 @@ private static boolean hasAssemblyConfiguration(AssemblyConfiguration assemblyCo
assemblyConfig.getDescriptorRef() != null);
}

public File extractOrCopy(AssemblyMode mode, File source, File destinationDir, String assemblyName, Logger log) throws IOException {
public File extractOrCopy(AssemblyMode mode, File source, File workingDirectory, String assemblyName, Logger log) throws IOException {

if (source.isDirectory() && mode.getExtension().equals("dir")) {

FileUtils.copyDirectoryToDirectory(source, destinationDir);
return destinationDir;
FileUtils.copyDirectoryToDirectory(source, workingDirectory);
return workingDirectory;

} else {

File destination = new File(destinationDir, assemblyName);
File destDirectory = new File(workingDirectory, assemblyName);

if (!destination.exists()) {
destination.mkdir();
if (!destDirectory.exists()) {
destDirectory.mkdir();
}

AbstractUnArchiver unArchiver = null;
Expand All @@ -269,11 +268,11 @@ public File extractOrCopy(AssemblyMode mode, File source, File destinationDir, S

if (unArchiver != null) {
unArchiver.setSourceFile(source);
unArchiver.setDestDirectory(destination);
unArchiver.setDestDirectory(destDirectory);
unArchiver.enableLogging(getLogger(log));
unArchiver.extract();

return destination;
return destDirectory;
}

return null;
Expand Down

0 comments on commit 61b0a92

Please sign in to comment.