diff --git a/grails-app/controllers/roguemek/game/StagingController.groovy b/grails-app/controllers/roguemek/game/StagingController.groovy index dc2ddb4e..0d3beda0 100644 --- a/grails-app/controllers/roguemek/game/StagingController.groovy +++ b/grails-app/controllers/roguemek/game/StagingController.groovy @@ -770,6 +770,9 @@ class StagingController { def pathRegex = ~/.*[\\|\/](.*)/ Set camoPaths = ContextHelper.getResourcePaths("/assets/images/camo/", false) camoPaths.each { path -> + // make sure there are no trailing slashes + path = path.replaceAll('/$', "") + path.find(pathRegex) { fullMatch, regPath -> camoPatternPaths << regPath } @@ -827,6 +830,9 @@ class StagingController { def pathRegex = ~/.*[\\|\/](.*)/ Set camoPaths = ContextHelper.getResourcePaths("/assets/images/camo/${patternPath}", false) camoPaths.each { path -> + // make sure there are no trailing slashes + path = path.replaceAll('/$', "") + path.find(pathRegex) { fullMatch, regPath -> camoPatternPaths << regPath }