From ef1b11d43280a61e37a7c4cbab2271c61664e601 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Wed, 06 Jan 2021 23:12:22 +0000
Subject: [PATCH] aufgeraeumt

---
 src/java/de/uhilger/filecms/web/UploadServlet.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/java/de/uhilger/filecms/web/UploadServlet.java b/src/java/de/uhilger/filecms/web/UploadServlet.java
index b561283..e0a761f 100644
--- a/src/java/de/uhilger/filecms/web/UploadServlet.java
+++ b/src/java/de/uhilger/filecms/web/UploadServlet.java
@@ -23,7 +23,6 @@
 import static de.uhilger.filecms.api.FileMgr.PUB_DIR_NAME;
 import static de.uhilger.filecms.api.FileMgr.PUB_DIR_PATH;
 import de.uhilger.filecms.data.FileRef;
-import de.uhilger.filecms.web.Initialiser;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -186,6 +185,7 @@
       // Process a file upload
       if (writeToFile) {
         File uploadedFile = new File(targetDir, fileName);
+        uploadedFile.getParentFile().mkdirs();
         logger.log(Level.FINER, "writeToFile " + uploadedFile.getAbsolutePath());
         item.write(uploadedFile);
       } else {

--
Gitblit v1.9.3