From 2b3e7ec02b0156b1ffef323d9f12e7363225cf5c Mon Sep 17 00:00:00 2001 From: Ulrich <undisclosed> Date: Tue, 28 Feb 2017 11:25:07 +0000 Subject: [PATCH] Bestimmung des Orts der Dateiablage ueber Parameter oder hart kodiert fuer WebBox-Struktur --- src/java/de/uhilger/filecms/api/FileMgr.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/java/de/uhilger/filecms/api/FileMgr.java b/src/java/de/uhilger/filecms/api/FileMgr.java index 78ac92d..d045623 100644 --- a/src/java/de/uhilger/filecms/api/FileMgr.java +++ b/src/java/de/uhilger/filecms/api/FileMgr.java @@ -187,7 +187,7 @@ /* ---- Hilfsfunktionen ---- */ private File getTargetDir(String relPath) { - logger.finer(relPath); + logger.fine(relPath); String targetPath = null; if(relPath.startsWith(PUB_DIR_NAME)) { targetPath = PUB_DIR_PATH + getUserName() + "/" + relPath.substring(PUB_DIR_NAME.length()); @@ -196,15 +196,18 @@ } else { // kann eigentlich nicht sein.. } - logger.finer(targetPath); + logger.fine(targetPath); File targetDir = new File(getBase().getAbsolutePath(), targetPath); return targetDir; } 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