diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-27 20:41:25 +0200 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-27 20:41:43 +0200 |
commit | be964e95a13bce974e4c7af4118979d6fea71112 (patch) | |
tree | 34b01c835160369afbaf8bcdf2597793e7d617eb /helpers/path.go | |
parent | beffe756a91f4c47e8e8fa622b9a52d213a8c821 (diff) |
Never remove trailing slash in RelPermalink
Fixed #1174
Diffstat (limited to 'helpers/path.go')
-rw-r--r-- | helpers/path.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helpers/path.go b/helpers/path.go index 71ffee980..0dee8db4c 100644 --- a/helpers/path.go +++ b/helpers/path.go @@ -331,6 +331,10 @@ func GetRelativePath(path, base string) (final string, err error) { if err != nil { return "", err } + + if strings.HasSuffix(path, "/") && !strings.HasSuffix(name, "/") { + name += "/" + } return name, nil } |