changeset 350:86e50ca164f1

Servlet version 1.5.8b - fixed bug in alias mapping code when alias ended in "/"
author robcast
date Wed, 10 Aug 2005 11:58:05 +0200
parents bafd7b503d14
children 269d1028dfb7
files servlet/src/digilib/io/AliasingDocuDirCache.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/io/AliasingDocuDirCache.java	Fri Apr 22 19:17:44 2005 +0200
+++ b/servlet/src/digilib/io/AliasingDocuDirCache.java	Wed Aug 10 11:58:05 2005 +0200
@@ -64,13 +64,17 @@
 		 */
 
 		for (Iterator i = pathMap.keySet().iterator(); i.hasNext();) {
-			String link = FileOps.normalName((String) i.next());
+			String link = (String) i.next();
 			String dir = (String) pathMap.get(link);
+			if (dir == null) {
+				logger.error("Key mismatch in mapping file!");
+				break;	
+			}
 			DocuDirectory destDir = new DocuDirectory(dir, this);
 			if (destDir.isValid()) {
 				logger.debug("Aliasing dir: " + link);
 				// add the alias name
-				putName(link, destDir);
+				putName(FileOps.normalName(link), destDir);
 				// add the real dir
 				putDir(destDir);
 			}