File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
grails-bootstrap/src/main/groovy/grails/io Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -217,11 +217,15 @@ class IOUtils extends SpringIOUtils {
217217 def rootResource = findRootResource(targetClass)
218218 if (rootResource != null ) {
219219
220- def rootFile = new UrlResource (rootResource). file. canonicalFile
220+ try {
221+ def rootFile = new UrlResource (rootResource). file. canonicalFile
221222
222- def rootPath = rootFile. path
223- if (rootPath. contains(BuildSettings . BUILD_CLASSES_PATH )) {
224- return new File (rootPath - BuildSettings . BUILD_CLASSES_PATH )
223+ def rootPath = rootFile. path
224+ if (rootPath. contains(BuildSettings . BUILD_CLASSES_PATH )) {
225+ return new File (rootPath - BuildSettings . BUILD_CLASSES_PATH )
226+ }
227+ } catch (FileNotFoundException fnfe) {
228+ return null
225229 }
226230 }
227231 return null
You can’t perform that action at this time.
0 commit comments