From d4a5c0e7d81425ae437649f9af3d44c903461d94 Mon Sep 17 00:00:00 2001 From: KartoffelChips <104089082+KartoffelChipss@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:12:03 +0200 Subject: [PATCH] Create temp files in storage path --- app/github/github.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/github/github.go b/app/github/github.go index 0cfbd2d..2bb90b5 100644 --- a/app/github/github.go +++ b/app/github/github.go @@ -35,7 +35,9 @@ func FetchAndDeployBranch(repoOwner, repoName, branch, pat, destDir string) erro return fmt.Errorf("GitHub returned %s for %s", resp.Status, archiveURL) } - tmpZip, err := os.CreateTemp("", "ghbranch-*.zip") + storageRoot := filepath.Dir(destDir) + + tmpZip, err := os.CreateTemp(storageRoot, "ghbranch-*.zip") if err != nil { return fmt.Errorf("creating temp zip: %w", err) } @@ -47,7 +49,7 @@ func FetchAndDeployBranch(repoOwner, repoName, branch, pat, destDir string) erro } tmpZip.Close() - tmpDir, err := os.MkdirTemp("", "ghbranch-unpack-*") + tmpDir, err := os.MkdirTemp(storageRoot, "ghbranch-unpack-*") if err != nil { return fmt.Errorf("creating temp dir: %w", err) }