diff options
Diffstat (limited to 'src/path/filepath/path_unix.go')
| -rw-r--r-- | src/path/filepath/path_unix.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/path/filepath/path_unix.go b/src/path/filepath/path_unix.go index 4e7d0d1b42..008b76e19e 100644 --- a/src/path/filepath/path_unix.go +++ b/src/path/filepath/path_unix.go @@ -34,3 +34,13 @@ func splitList(path string) []string { func abs(path string) (string, error) { return unixAbs(path) } + +func join(elem []string) string { + // If there's a bug here, fix the logic in ./path_plan9.go too. + for i, e := range elem { + if e != "" { + return Clean(strings.Join(elem[i:], string(Separator))) + } + } + return "" +} |
