175 public boolean delete() { |
175 public boolean delete() { |
176 return delegate.delete(); |
176 return delegate.delete(); |
177 } |
177 } |
178 |
178 |
179 void checkRead() throws IOException { |
179 void checkRead() throws IOException { |
180 if (cantRead != null && cantRead.matcher(getName()).matches()) |
180 String canonName = getName().replace(File.separatorChar, '/'); |
|
181 if (cantRead != null && cantRead.matcher(canonName).matches()) |
181 throw new IOException("FileManager: Can't read"); |
182 throw new IOException("FileManager: Can't read"); |
182 } |
183 } |
183 |
184 |
184 void checkWrite() throws IOException { |
185 void checkWrite() throws IOException { |
185 if (cantWrite != null && cantWrite.matcher(getName()).matches()) |
186 String canonName = getName().replace(File.separatorChar, '/'); |
|
187 if (cantWrite != null && cantWrite.matcher(canonName).matches()) |
186 throw new IOException("FileManager: Can't write"); |
188 throw new IOException("FileManager: Can't write"); |
187 } |
189 } |
188 |
190 |
189 JavaFileObject delegate; |
191 JavaFileObject delegate; |
190 } |
192 } |