From ddde3d54a2c6763f86a4fa637bab169b9e275be4 Mon Sep 17 00:00:00 2001 From: milldr Date: Fri, 27 Dec 2024 15:10:12 -0500 Subject: [PATCH] Improve path resolution handling in stack_processor_utils --- internal/exec/stack_processor_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/exec/stack_processor_utils.go b/internal/exec/stack_processor_utils.go index 5d5964fde..adc022a05 100644 --- a/internal/exec/stack_processor_utils.go +++ b/internal/exec/stack_processor_utils.go @@ -1751,7 +1751,7 @@ func resolveRelativePath(path string, currentFilePath string) string { } // Check if the path starts with "." or ".." - firstElement := strings.Split(path, string(filepath.Separator))[0] + firstElement := filepath.Clean(strings.Split(path, string(filepath.Separator))[0]) if firstElement == "." || firstElement == ".." { // Join the current local path with the current stack file path baseDir := filepath.Dir(currentFilePath)