Index: trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 4828)
+++ trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 4829)
@@ -53,5 +53,5 @@
     //TODO Do loading from partial cache and downloading at the same time, don't wait for partical cache to load
 
-    private static final StringProperty PROP_CACHE_PATH = new StringProperty("imagery.wms-cache.path", new File(Main.pref.getCacheDirectory(), "wms").getPath());
+    private static final StringProperty PROP_CACHE_PATH = new StringProperty("imagery.wms-cache.path", "wms");
     private static final String INDEX_FILENAME = "index.xml";
     private static final String LAYERS_INDEX_FILENAME = "layers.properties";
@@ -98,7 +98,6 @@
     protected String cacheDirPath() {
         String cPath = PROP_CACHE_PATH.get();
-        if (!(cPath.startsWith("/") || cPath.startsWith(":/",1))) {
-            //Not an absolute path
-            cPath = Main.pref.getCacheDirectory() + cPath;
+        if (!(new File(cPath).isAbsolute())) {
+            cPath = Main.pref.getCacheDirectory() + File.separator + cPath;
         }
         return cPath;
