 RCS file: /cvsroot/webdav-servlet/webdav-servlet/src/main/java/net/sf/webdav/LocalFileSystemStorage.java,v
 retrieving revision 1.4
 diff -r1.4 LocalFileSystemStorage.java
-71c71,82
+71c71,86
 < 			root = new File(rootPath);
 ---
 >             if (rootPath.equals("*WAR-FILE-ROOT*")) {
 >                 String file = LocalFileSystemStorage.class.getProtectionDomain().getCodeSource().getLocation().getFile().replace('\\','/');
+>                 if (file.charAt(0) == '/' && System.getProperty("os.name").indexOf("Windows") != -1) {
+>                     file = file.substring(1, file.length());
+>                 }
+> 
 >                 int ix = file.indexOf("/WEB-INF/");
 >                 if (ix != -1) {
->                     rootPath = file.substring(0, ix);
+>                     rootPath = file.substring(0, ix).replace('/', File.separatorChar);
 >                 } else {
 >                     throw new WebdavException("Could not determine root of war file. Can't extract from path '"
 >                             + file + "' for this web container");                    

< 						resp.sendError(WebdavStatus.SC_CONFLICT);
< 					}
---
>                     if (parentPath != null && !fStore.isFolder(parentPath) && lazyFolderCreationOnPut) {
>                         fStore.createFolder(parentPath);
>                     }

>                 + req.toString();
> 
>         if (fResLocks.lock(path, lockOwner, false, 0)) {
672,682c711,723
< 						if (resourceLength > 0) {
< 							if (resourceLength <= Integer.MAX_VALUE) {
< 								resp.setContentLength((int) resourceLength);
