From ad22356ec660844ec43ccbe9a834845f1a6f7cf8 Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Wed, 24 Apr 2024 10:24:05 -0700 Subject: 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 Reviewed-by: Ian Lance Taylor --- src/path/filepath/path.go | 4 ++-- src/path/filepath/path_windows.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/path/filepath') 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 } } -- cgit v1.3-5-g9baa