changeset 456:2a9d37492997

fixed bug in dirInfo-xml.jsp added size tag to dir info
author robcast
date Wed, 01 Feb 2006 18:16:21 +0100
parents 9c16290e6f44
children 4778d8af7913
files client/digitallibrary/dirInfo-xml.jsp
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/dirInfo-xml.jsp	Mon Jan 30 16:02:04 2006 +0100
+++ b/client/digitallibrary/dirInfo-xml.jsp	Wed Feb 01 18:16:21 2006 +0100
@@ -25,17 +25,19 @@
 
 %><!-- Automatically generated XML snippet with directory info -->
 <dir><% if (dir != null) { %>
+  <size><%= dir.size() %></size>
   <name><%= dir.getDirName() %></name>
   <fsname><%= dir.getDir().getPath() %></fsname> 
 <%
     int l = dir.size();
     for (int i = 0; i < l; i++) {
-    		digilib.io.DocuDirent f = dir.get(i); 
+    		digilib.io.DocuDirent f = dir.get(i);
+        String fn = (f != null) ? f.getName() : "null";
 %>  <file>
     <index><%= i+1 %></index>
-    <name><%= (f != null) ? f.getBasename() : "null" %></name>
-    <fsname><%= (f != null) ? f.getName() : "null" %></fsname>
-  </file> 
+    <name><%= digilib.io.FileOps.basename(fn) %></name>
+    <fsname><%= fn %></fsname>
+  </file>
 <%
     } // for 
   } // if dir