Skip to content

Commit 29ed98d

Browse files
k1LoWdaveshanley
authored andcommitted
Keep basePaths unmodified.
1 parent 8c0c19f commit 29ed98d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

paths/paths.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ func checkPathAgainstBase(docPath, urlPath string, basePaths []string) bool {
223223
if docPath == urlPath {
224224
return true
225225
}
226-
for i := range basePaths {
227-
if basePaths[i][len(basePaths[i])-1] == '/' {
228-
basePaths[i] = basePaths[i][:len(basePaths[i])-1]
226+
for _, basePath := range basePaths {
227+
if basePath[len(basePath)-1] == '/' {
228+
basePath = basePath[:len(basePath)-1]
229229
}
230-
merged := fmt.Sprintf("%s%s", basePaths[i], urlPath)
230+
merged := fmt.Sprintf("%s%s", basePath, urlPath)
231231
if docPath == merged {
232232
return true
233233
}

0 commit comments

Comments
 (0)