Index: trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java	(revision 4569)
+++ trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java	(revision 4570)
@@ -86,5 +86,5 @@
                 }
                 File newFile = new File(newname);
-                if (file.renameTo(newFile)) {
+                if (Main.platform.rename(file, newFile)) {
                     layer.setAssociatedFile(newFile);
                     nameText = newFile.getName();
