diff options
| author | Damien Neil <dneil@google.com> | 2024-04-24 10:24:05 -0700 |
|---|---|---|
| committer | Damien Neil <dneil@google.com> | 2024-04-26 23:07:37 +0000 |
| commit | ad22356ec660844ec43ccbe9a834845f1a6f7cf8 (patch) | |
| tree | 3688d6cabcf02613491f0481a61040566cde8e9c /src/path | |
| parent | d69f87445cb28d68b4d62d8b80dff8a8d5a9203e (diff) | |
| download | go-ad22356ec660844ec43ccbe9a834845f1a6f7cf8.tar.xz | |
all: rename internal/safefilepath to internal/filepathlite
The safefilepath package was originally added to contain
the FromFS function. We subsequently added FromFS to path/filepath
as Localize. The safefilepath package now exists only to permit
the os package to import Localize.
Rename safefilepath to filepathlite to better indicate that it's
a low-dependency version of filepath.
Change-Id: I4c5f9b28e8581f841947b48c5cac9954cd0c9535
Reviewed-on: https://go-review.googlesource.com/c/go/+/581517
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/path')
| -rw-r--r-- | src/path/filepath/path.go | 4 | ||||
| -rw-r--r-- | src/path/filepath/path_windows.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/path/filepath/path.go b/src/path/filepath/path.go index 6c8a0aa8b3..cd70c2b318 100644 --- a/src/path/filepath/path.go +++ b/src/path/filepath/path.go @@ -13,7 +13,7 @@ package filepath import ( "errors" - "internal/safefilepath" + "internal/filepathlite" "io/fs" "os" "slices" @@ -221,7 +221,7 @@ func unixIsLocal(path string) bool { // // The path returned by Localize will always be local, as reported by IsLocal. func Localize(path string) (string, error) { - return safefilepath.Localize(path) + return filepathlite.Localize(path) } // ToSlash returns the result of replacing each separator character diff --git a/src/path/filepath/path_windows.go b/src/path/filepath/path_windows.go index 6adb7d4bc4..44037c45ac 100644 --- a/src/path/filepath/path_windows.go +++ b/src/path/filepath/path_windows.go @@ -5,7 +5,7 @@ package filepath import ( - "internal/safefilepath" + "internal/filepathlite" "os" "strings" "syscall" @@ -42,7 +42,7 @@ func isLocal(path string) bool { if part == "." || part == ".." { hasDots = true } - if safefilepath.IsReservedName(part) { + if filepathlite.IsReservedName(part) { return false } } |
