langtools/test/tools/javac/diags/FileManager.java
changeset 6926 f0beafc94c59
parent 6149 48de3564aa13
child 36526 3b41f1c69604
--- a/langtools/test/tools/javac/diags/FileManager.java	Tue Oct 05 17:37:31 2010 -0700
+++ b/langtools/test/tools/javac/diags/FileManager.java	Thu Oct 07 15:26:32 2010 -0700
@@ -177,12 +177,14 @@
         }
 
         void checkRead() throws IOException {
-            if (cantRead != null && cantRead.matcher(getName()).matches())
+            String canonName = getName().replace(File.separatorChar, '/');
+            if (cantRead != null && cantRead.matcher(canonName).matches())
                 throw new IOException("FileManager: Can't read");
         }
 
         void checkWrite() throws IOException {
-            if (cantWrite != null && cantWrite.matcher(getName()).matches())
+            String canonName = getName().replace(File.separatorChar, '/');
+            if (cantWrite != null && cantWrite.matcher(canonName).matches())
                 throw new IOException("FileManager: Can't write");
         }