Mercurial > hg > digilib-old
comparison servlet/src/digilib/io/AliasingDocuDirCache.java @ 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 | 2c7747cc1838 |
children | e758a49258e8 |
comparison
equal
deleted
inserted
replaced
349:bafd7b503d14 | 350:86e50ca164f1 |
---|---|
62 /* | 62 /* |
63 * load map entries into cache | 63 * load map entries into cache |
64 */ | 64 */ |
65 | 65 |
66 for (Iterator i = pathMap.keySet().iterator(); i.hasNext();) { | 66 for (Iterator i = pathMap.keySet().iterator(); i.hasNext();) { |
67 String link = FileOps.normalName((String) i.next()); | 67 String link = (String) i.next(); |
68 String dir = (String) pathMap.get(link); | 68 String dir = (String) pathMap.get(link); |
69 if (dir == null) { | |
70 logger.error("Key mismatch in mapping file!"); | |
71 break; | |
72 } | |
69 DocuDirectory destDir = new DocuDirectory(dir, this); | 73 DocuDirectory destDir = new DocuDirectory(dir, this); |
70 if (destDir.isValid()) { | 74 if (destDir.isValid()) { |
71 logger.debug("Aliasing dir: " + link); | 75 logger.debug("Aliasing dir: " + link); |
72 // add the alias name | 76 // add the alias name |
73 putName(link, destDir); | 77 putName(FileOps.normalName(link), destDir); |
74 // add the real dir | 78 // add the real dir |
75 putDir(destDir); | 79 putDir(destDir); |
76 } | 80 } |
77 } | 81 } |
78 } | 82 } |