mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
Simplify ExtractRootPaths
This commit is contained in:
@@ -458,7 +458,6 @@ 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 != "" {
|
||||
@@ -466,7 +465,6 @@ func ExtractRootPaths(paths []string) []string {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
r[i] = root
|
||||
}
|
||||
return r
|
||||
|
Reference in New Issue
Block a user