aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/path
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/path')
-rw-r--r--libgo/go/path/filepath/example_unix_test.go1
-rw-r--r--libgo/go/path/filepath/example_unix_walk_test.go1
-rw-r--r--libgo/go/path/filepath/path_test.go2
-rw-r--r--libgo/go/path/filepath/path_unix.go1
-rw-r--r--libgo/go/path/filepath/path_windows.go4
-rw-r--r--libgo/go/path/filepath/symlink_unix.go1
6 files changed, 6 insertions, 4 deletions
diff --git a/libgo/go/path/filepath/example_unix_test.go b/libgo/go/path/filepath/example_unix_test.go
index 4ce1009..b364cf0 100644
--- a/libgo/go/path/filepath/example_unix_test.go
+++ b/libgo/go/path/filepath/example_unix_test.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows && !plan9
-// +build !windows,!plan9
package filepath_test
diff --git a/libgo/go/path/filepath/example_unix_walk_test.go b/libgo/go/path/filepath/example_unix_walk_test.go
index d72efce..86146db 100644
--- a/libgo/go/path/filepath/example_unix_walk_test.go
+++ b/libgo/go/path/filepath/example_unix_walk_test.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows && !plan9
-// +build !windows,!plan9
package filepath_test
diff --git a/libgo/go/path/filepath/path_test.go b/libgo/go/path/filepath/path_test.go
index 1be17df..85926ea 100644
--- a/libgo/go/path/filepath/path_test.go
+++ b/libgo/go/path/filepath/path_test.go
@@ -794,6 +794,8 @@ var winisabstests = []IsAbsTest{
{`c:a\b`, false},
{`c:\a\b`, true},
{`c:/a/b`, true},
+ {`\\host\share`, true},
+ {`\\host\share\`, true},
{`\\host\share\foo`, true},
{`//host/share/foo/bar`, true},
}
diff --git a/libgo/go/path/filepath/path_unix.go b/libgo/go/path/filepath/path_unix.go
index b0a6391..88d7325 100644
--- a/libgo/go/path/filepath/path_unix.go
+++ b/libgo/go/path/filepath/path_unix.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || hurd || (js && wasm) || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd hurd js,wasm linux netbsd openbsd solaris
package filepath
diff --git a/libgo/go/path/filepath/path_windows.go b/libgo/go/path/filepath/path_windows.go
index 445c868..b4d8ac3 100644
--- a/libgo/go/path/filepath/path_windows.go
+++ b/libgo/go/path/filepath/path_windows.go
@@ -45,6 +45,10 @@ func IsAbs(path string) (b bool) {
if l == 0 {
return false
}
+ // If the volume name starts with a double slash, this is a UNC path.
+ if isSlash(path[0]) && isSlash(path[1]) {
+ return true
+ }
path = path[l:]
if path == "" {
return false
diff --git a/libgo/go/path/filepath/symlink_unix.go b/libgo/go/path/filepath/symlink_unix.go
index 657945a..7bfe17e 100644
--- a/libgo/go/path/filepath/symlink_unix.go
+++ b/libgo/go/path/filepath/symlink_unix.go
@@ -1,5 +1,4 @@
//go:build !windows
-// +build !windows
package filepath