From 61b0a928c218b99f20c44f8d870cb141cf358e04 Mon Sep 17 00:00:00 2001 From: Devang Gaur Date: Wed, 11 Mar 2020 13:37:33 +0530 Subject: [PATCH] renamed variable for clarity --- .../kubernetes/jib/JibAssemblyManager.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/io/fabric8/maven/core/service/kubernetes/jib/JibAssemblyManager.java b/core/src/main/java/io/fabric8/maven/core/service/kubernetes/jib/JibAssemblyManager.java index 181458caec..98fdd3f772 100644 --- a/core/src/main/java/io/fabric8/maven/core/service/kubernetes/jib/JibAssemblyManager.java +++ b/core/src/main/java/io/fabric8/maven/core/service/kubernetes/jib/JibAssemblyManager.java @@ -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; @@ -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;