Mercurial > hg > digilib-old
comparison servlet/src/digilib/io/DocuDirCache.java @ 116:55bc0e928ac5
Servlet Version 1.9b4
Fixed bug with single file access on windows.
author | robcast |
---|---|
date | Tue, 27 May 2003 21:41:04 +0200 |
parents | 226624784fe3 |
children | bc8df0133c04 |
comparison
equal
deleted
inserted
replaced
115:c43700f2a966 | 116:55bc0e928ac5 |
---|---|
98 put(dd); | 98 put(dd); |
99 } | 99 } |
100 } else { | 100 } else { |
101 // maybe it's a file | 101 // maybe it's a file |
102 if (f.canRead()) { | 102 if (f.canRead()) { |
103 // get the parent directory | 103 // get the parent directory string (like we store it in the cache) |
104 String d = fn.substring(0, fn.lastIndexOf(File.separator)); | 104 String d = fn.substring(0, fn.lastIndexOf("/")); |
105 // try it in the cache | 105 // try it in the cache |
106 dd = (DocuDirectory) map.get(d); | 106 dd = (DocuDirectory) map.get(d); |
107 if (dd == null) { | 107 if (dd == null) { |
108 // try to read from disk | 108 // try to read from disk |
109 dd = new DocuDirectory(d, baseDirNames); | 109 dd = new DocuDirectory(d, baseDirNames); |