aboutsummaryrefslogtreecommitdiffstats
path: root/modules/util/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/util/path.go')
-rw-r--r--modules/util/path.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/util/path.go b/modules/util/path.go
index d9f17bd124..0e56348978 100644
--- a/modules/util/path.go
+++ b/modules/util/path.go
@@ -36,9 +36,10 @@ func PathJoinRel(elem ...string) string {
elems[i] = path.Clean("/" + e)
}
p := path.Join(elems...)
- if p == "" {
+ switch p {
+ case "":
return ""
- } else if p == "/" {
+ case "/":
return "."
}
return p[1:]