# HG changeset patch # User robcast # Date 1364723244 -7200 # Node ID ac3719dc46ffa8f10a578da8908fcd7d48797544 # Parent cf8ecc67200e616730c08b651ddf447583cfffac fix bug in dlConfig when File is null. diff -r cf8ecc67200e -r ac3719dc46ff .hgignore --- a/.hgignore Thu Mar 28 16:28:52 2013 +0100 +++ b/.hgignore Sun Mar 31 11:47:24 2013 +0200 @@ -111,4 +111,6 @@ syntax: regexp ^servlet/\.classpath$ syntax: regexp -^servlet/\.project$ \ No newline at end of file +^servlet/\.project$ +syntax: regexp +^servlet/bin$ \ No newline at end of file diff -r cf8ecc67200e -r ac3719dc46ff webapp/src/main/webapp/server/dlConfig.jsp --- a/webapp/src/main/webapp/server/dlConfig.jsp Thu Mar 28 16:28:52 2013 +0100 +++ b/webapp/src/main/webapp/server/dlConfig.jsp Sun Mar 31 11:47:24 2013 +0200 @@ -84,14 +84,18 @@ } } else if (param.getValue() instanceof java.io.File) { java.io.File f = (java.io.File) param.getValue(); - if (!f.isAbsolute()) { - // relative path -> use getRealPath to resolve - f = new File(pageContext.getServletContext().getRealPath(f.getPath())); - } - if (f.canRead()) { - val = f.toString(); + if (f == null) { + val = "[null]"; } else { - val = "[missing file] "+f.toString(); + if (!f.isAbsolute()) { + // relative path -> use getRealPath to resolve + f = new File(pageContext.getServletContext().getRealPath(f.getPath())); + } + if (f.canRead()) { + val = f.toString(); + } else { + val = "[missing file] "+f.toString(); + } } } else { val = param.getAsString();