summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--helpers/path.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/helpers/path.go b/helpers/path.go
index 07d08fa69..7fb116a77 100644
--- a/helpers/path.go
+++ b/helpers/path.go
@@ -458,13 +458,11 @@ func ExtractRootPaths(paths []string) []string {
r := make([]string, len(paths))
for i, p := range paths {
root := filepath.ToSlash(p)
- if strings.Contains(root, "/") {
- sections := strings.Split(root, "/")
- for _, section := range sections {
- if section != "" {
- root = section
- break
- }
+ sections := strings.Split(root, "/")
+ for _, section := range sections {
+ if section != "" {
+ root = section
+ break
}
}
r[i] = root