summaryrefslogtreecommitdiff
path: root/libgo/go/path/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/path/path.go')
-rw-r--r--libgo/go/path/path.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/libgo/go/path/path.go b/libgo/go/path/path.go
index 5c905110a1b..c513114b4d7 100644
--- a/libgo/go/path/path.go
+++ b/libgo/go/path/path.go
@@ -149,9 +149,11 @@ func Split(path string) (dir, file string) {
return path[:i+1], path[i+1:]
}
-// Join joins any number of path elements into a single path, adding a
-// separating slash if necessary. The result is Cleaned; in particular,
-// all empty strings are ignored.
+// Join joins any number of path elements into a single path,
+// separating them with slashes. Empty elements are ignored.
+// The result is Cleaned. However, if the argument list is
+// empty or all its elements are empty, Join returns
+// an empty string.
func Join(elem ...string) string {
for i, e := range elem {
if e != "" {