I am developing with the webdavgui libs and I found something that might be a bug. (I am testing my stuff against apache's mod_dav so maybe this one is wrong.)

The symptom was that I got npe's when browsing a webdav server that contains directories. If it only contained files there was no problem.

I changed some stuff in two source files and now it works for me. I do not fully understand what is going on in these classes so maybe the fixes are completely wrong.

In the file:
src/contrib/webdavgui/src/java/org/apache/webdav/ui/filechooser/dir/SPWebFolder.java
I changed in init()

if (resourceUrlPath.endsWith("/"))
urlPathSlashIndep = resourceUrlPath.substring(0,
resourceUrlPath.length()-1);
else
urlPathSlashIndep = resourceUrlPath + "/";

into
if(!resourceUrlPath.endsWith("/"))
urlPathSlashIndep += "/";


In the file:
src/contrib/webdavgui/src/java/org/apache/webdav/ui/lib/methods/SPPropFindMethod.java

in the getProperty method I disabled these lines that removed a trailing slash

// Seems to return null in this case
if (urlPath.endsWith("/"))
urlPath=urlPath.substring(0,urlPath.length()-1);

and in isCollection I added check for p == null

SPProperty p = getProperty("resourcetype", url);
if(p==null)
return false;


--
Neil de Hoog


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to