Author: nico
Date: 2009-06-05 15:21:16 +0200 (Fri, 05 Jun 2009)
New Revision: 35775

Modified:
   mmbase/trunk/core/src/main/java/org/mmbase/util/ResourceLoader.java
Log:
This fileUrl works on windows. previous one did not work. The Drive Letter was 
removed from the file path

Modified: mmbase/trunk/core/src/main/java/org/mmbase/util/ResourceLoader.java
===================================================================
--- mmbase/trunk/core/src/main/java/org/mmbase/util/ResourceLoader.java 
2009-06-05 13:20:21 UTC (rev 35774)
+++ mmbase/trunk/core/src/main/java/org/mmbase/util/ResourceLoader.java 
2009-06-05 13:21:16 UTC (rev 35775)
@@ -1145,7 +1145,8 @@
                 } else {
                     File file = getFile(name);
                     if (file == null) return 
NOT_AVAILABLE_URLSTREAM_HANDLER.openConnection(name);
-                    u = new URL(null, "file://" + file, this);
+                    String fileUrl = file.toURI().toURL().toString();
+                    u = new URL(null, fileUrl, this);
                 }
             } catch (MalformedURLException mfue) {
                 throw new AssertionError(mfue.getMessage());

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to