diff options
-rw-r--r-- | vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/filemanage/http/ToolUtil.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/filemanage/http/ToolUtil.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/filemanage/http/ToolUtil.java index b9ae3bd2..1d5d46f9 100644 --- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/filemanage/http/ToolUtil.java +++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/filemanage/http/ToolUtil.java @@ -123,18 +123,16 @@ public class ToolUtil { * @return boolean */ public static boolean createDir(String destDirName) { - File dir = new File(destDirName); + String useDestDirName = destDirName; + if (!useDestDirName.endsWith(File.separator)) { + useDestDirName += File.separator; + } + File dir = new File(useDestDirName); if (dir.exists()) { dir.delete(); } - if (!destDirName.endsWith(File.separator)) { - destDirName = destDirName + File.separator; - } - if (dir.mkdirs()) { - return true; - } else { - return false; - } + + return dir.mkdirs(); } public static String getHttpServerAbsolutePath() { |