From fab80c872af697d61f200fd410a7ecc64ca0a537 Mon Sep 17 00:00:00 2001 From: ulrich <undisclosed> Date: Mon, 06 Mar 2017 22:59:47 +0000 Subject: [PATCH] dekodieren fuer Codemirror --- src/java/de/uhilger/filecms/api/UploadServlet.java | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/java/de/uhilger/filecms/api/UploadServlet.java b/src/java/de/uhilger/filecms/api/UploadServlet.java index 927e25c..ff788ff 100644 --- a/src/java/de/uhilger/filecms/api/UploadServlet.java +++ b/src/java/de/uhilger/filecms/api/UploadServlet.java @@ -22,13 +22,12 @@ import static de.uhilger.filecms.api.FileMgr.HOME_DIR_PATH; 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 de.uhilger.filesystem.FileRef; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.security.Principal; -import java.util.Enumeration; import java.util.Iterator; import java.util.List; import java.util.logging.Level; @@ -166,8 +165,11 @@ private FileRef getBase() { FileRef base = null; Object o = getServletContext().getAttribute(Initialiser.FILE_BASE); - if (o instanceof FileRef) { - base = (FileRef) o; + if(o instanceof String) { + String baseStr = (String) o; + logger.fine(baseStr); + File file = new File(baseStr); + base = new FileRef(file.getAbsolutePath(), file.isDirectory()); } return base; } -- Gitblit v1.9.3