Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions grails-bootstrap/src/main/groovy/grails/io/IOUtils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ class IOUtils extends SpringIOUtils {
if(classRes) {
String rootPath = classRes.toString() - pathToClassFile
if(rootPath.endsWith(BuildSettings.BUILD_CLASSES_PATH)) {
rootPath = rootPath.replace('/build/classes/', '/build/resources/')
if (BuildSettings.BUILD_CLASSES_PATH == "build/classes/groovy/main" ) {
rootPath = rootPath.replace('/build/classes/groovy/', '/build/resources/')
} else {
rootPath = rootPath.replace('/build/classes/', '/build/resources/')
}
}
else {
rootPath = "$rootPath/"
Expand Down Expand Up @@ -231,7 +235,11 @@ class IOUtils extends SpringIOUtils {
if(classRes) {
def rootPath = classRes.toString() - pathToClassFile
if(rootPath.endsWith(BuildSettings.BUILD_CLASSES_PATH)) {
rootPath = rootPath.replace('/build/classes/', '/build/resources/')
if (BuildSettings.BUILD_CLASSES_PATH == "build/classes/groovy/main" ) {
rootPath = rootPath.replace('/build/classes/groovy/', '/build/resources/')
} else {
rootPath = rootPath.replace('/build/classes/', '/build/resources/')
}
}
return new URL("$rootPath$path")
}
Expand Down