From 8a5edd39b15fb93a705974b984265dd05b9e7c53 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 6 Jan 2024 22:43:35 +0100 Subject: [PATCH] Fix leading slash --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.go b/main.go index ee643e5..094fe5a 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,6 @@ import ( "net/http" "os" "path/filepath" - "strings" "github.com/sethvargo/go-githubactions" ) @@ -78,11 +77,10 @@ func main() { } if info.IsDir() { - githubactions.Infof("Skipping directory %v", innerPath) return nil } - relativeParh := strings.TrimPrefix(innerPath, path) + relativeParh, _ := filepath.Rel(path, innerPath) githubactions.Infof("Reading %v", relativeParh) w, err := mwriter.CreateFormFile("file", relativeParh) if err != nil {