From 81abd5a101a52f7ca9c803af879815dacae028b1 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Thu, 28 Jan 2021 12:24:56 +0000
Subject: [PATCH] Sortieren aufgeraeumt

---
 src/java/de/uhilger/filecms/data/FileRef.java |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/java/de/uhilger/filecms/data/FileRef.java b/src/java/de/uhilger/filecms/data/FileRef.java
index 22bbe3e..e2f1906 100644
--- a/src/java/de/uhilger/filecms/data/FileRef.java
+++ b/src/java/de/uhilger/filecms/data/FileRef.java
@@ -41,7 +41,7 @@
 	private Boolean isHidden;
 	private Long lastModified;
 	private Long length;
-  private String mimetype;
+  private String mimetype = "text";
 
 	/**
 	 * create a new instance of <code>FileRef</code>. Note that the created FileRef is 
@@ -63,6 +63,9 @@
 		this.isHidden = isHidden;
 		this.lastModified = lastModified;
 		this.length = length;
+    if(isDirectory()) {
+      this.mimetype = " ";
+    }
 	}
 	
 	/**
@@ -99,7 +102,9 @@
   }
 
   public void setMimetype(String mimetype) {
-    this.mimetype = mimetype;
+    if(mimetype != null && mimetype.length() > 1) {
+      this.mimetype = mimetype;
+    }
   }
 
 	/**

--
Gitblit v1.9.3