Skip to content
This repository has been archived by the owner on Jan 30, 2022. It is now read-only.

Commit

Permalink
Fixed issue with war camo asset paths trailing slash causing camo not…
Browse files Browse the repository at this point in the history
… to appear in selection
  • Loading branch information
harbdog committed Jun 14, 2016
1 parent 189e8aa commit 7d15f57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions grails-app/controllers/roguemek/game/StagingController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,9 @@ class StagingController {
def pathRegex = ~/.*[\\|\/](.*)/
Set<String> 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
}
Expand Down Expand Up @@ -827,6 +830,9 @@ class StagingController {
def pathRegex = ~/.*[\\|\/](.*)/
Set<String> 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
}
Expand Down

0 comments on commit 7d15f57

Please sign in to comment.