From b12c95e1d53caed954314ed5e42f0e54730df5cd Mon Sep 17 00:00:00 2001 From: ulrich <undisclosed> Date: Tue, 03 Apr 2018 07:40:16 +0000 Subject: [PATCH] Dateiablage als JNDI-Parameter eingebaut --- src/java/de/uhilger/filecms/api/FileMgr.java | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/java/de/uhilger/filecms/api/FileMgr.java b/src/java/de/uhilger/filecms/api/FileMgr.java index 77a2d69..2b8b985 100644 --- a/src/java/de/uhilger/filecms/api/FileMgr.java +++ b/src/java/de/uhilger/filecms/api/FileMgr.java @@ -90,7 +90,7 @@ private List<FileRef> listInt(String relPath, String orderBy, String order) { Bild bild = new Bild(); List<FileRef> files = new ArrayList(); - if (!relPath.startsWith(".")) { + if (!relPath.startsWith(".") && !relPath.contains("WEB-INF") && !relPath.contains("META-INF")) { if (relPath.length() == 0) { FileRef namedPublicFolder = new FileRef(PUB_DIR_NAME, true); logger.finer(namedPublicFolder.getAbsolutePath()); @@ -126,9 +126,13 @@ fname = fname.substring(0, fname.length() - 1); } logger.fine(fname); - FileRef ref = new FileRef(fname, fileArray[i].isDirectory()); - ref.setMimetype(bild.getMimeType(fileArray[i])); - files.add(ref); + if(!fname.contains("WEB-INF") && !fname.contains("META-INF")) { + long fLen = fileArray[i].length(); + long lastMod = fileArray[i].lastModified(); + FileRef ref = new FileRef(fname, fileArray[i].isDirectory(), fileArray[i].isHidden(), lastMod, fLen); + ref.setMimetype(bild.getMimeType(fileArray[i])); + files.add(ref); + } } } } -- Gitblit v1.9.3