Skip to content
Open
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
5 changes: 4 additions & 1 deletion src/groovy/org/grails/plugin/resource/ResourceMeta.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class ResourceMeta {

String getActualUrlParent() {
def lastSlash = actualUrl.lastIndexOf('/')
if (lastSlash >= 0) {
if (lastSlash > 0) {
return actualUrl[0..lastSlash-1]
} else {
return ''
Expand Down Expand Up @@ -416,6 +416,9 @@ class ResourceMeta {
* All resource URLs must be app-relative with no ../ or ./
*/
String relativeTo(ResourceMeta base) {
if (base.is(this)) {
return actualUrl
}
if (actualAbsolute) {
return actualUrl
}
Expand Down