Merge branch '5.2.x'

This commit is contained in:
Juergen Hoeller
2020-09-08 12:24:18 +02:00
2 changed files with 5 additions and 12 deletions

View File

@@ -89,15 +89,8 @@ public class FileUrlResource extends UrlResource implements WritableResource {
@Override
public boolean isWritable() {
try {
URL url = getURL();
if (ResourceUtils.isFileURL(url)) {
// Proceed with file system resolution
File file = getFile();
return (file.canWrite() && !file.isDirectory());
}
else {
return true;
}
File file = getFile();
return (file.canWrite() && !file.isDirectory());
}
catch (IOException ex) {
return false;