summaryrefslogtreecommitdiffstats
path: root/vnfmarket-be
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket-be')
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/filemanage/http/ToolUtil.java16
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 1b45e75f..e81a8bb4 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
@@ -155,18 +155,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() {