From f82bdff5f944cffb2017018aca2f96704dae5b3a Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 30 Mar 2026 08:34:28 +0000 Subject: object/fetch: Use the new path splitting API --- object/fetch/treefs_path.go | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'object/fetch/treefs_path.go') diff --git a/object/fetch/treefs_path.go b/object/fetch/treefs_path.go index 7aa31c7f..a2dc3155 100644 --- a/object/fetch/treefs_path.go +++ b/object/fetch/treefs_path.go @@ -1,29 +1,11 @@ package fetch -import ( - "io/fs" - "strings" -) +import "io/fs" func treeFSValidPath(name string) bool { return name == "." || fs.ValidPath(name) } -func treeFSSplitPath(name string) [][]byte { - if name == "." { - return nil - } - - parts := strings.Split(name, "/") - - out := make([][]byte, len(parts)) - for i, part := range parts { - out[i] = []byte(part) - } - - return out -} - func treeFSPathError(op treeFSOp, path string, err error) error { return &fs.PathError{Op: op.pathErrorOp(), Path: path, Err: err} } -- cgit v1.3.1-10-gc9f91