From 087959e81bcd52104676ccacedd605e6491b4376 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 3 Jul 2025 04:11:38 +0900 Subject: app: remove split implementation It is completely nonsensical and highly error-prone to have multiple implementations of this in the same build. This should be switched at compile time instead therefore the split packages are pointless. Signed-off-by: Ophestra --- internal/app/path.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 internal/app/path.go (limited to 'internal/app/path.go') diff --git a/internal/app/path.go b/internal/app/path.go new file mode 100644 index 00000000..56e373d9 --- /dev/null +++ b/internal/app/path.go @@ -0,0 +1,11 @@ +package app + +import ( + "path/filepath" + "strings" +) + +func deepContainsH(basepath, targpath string) (bool, error) { + rel, err := filepath.Rel(basepath, targpath) + return err == nil && rel != ".." && !strings.HasPrefix(rel, string([]byte{'.', '.', filepath.Separator})), err +} -- cgit v1.3.1