From 23df2ab9997dde216875c6139c8301aae93ab973 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 8 Jan 2026 08:23:16 +0900 Subject: [PATCH] internal/pkg: place ephemeral upperdir in tmp This enables the use of directories made writable this way as scratch space. Signed-off-by: Ophestra --- internal/pkg/exec.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/internal/pkg/exec.go b/internal/pkg/exec.go index c12c909..2975395 100644 --- a/internal/pkg/exec.go +++ b/internal/pkg/exec.go @@ -7,6 +7,7 @@ import ( "os" "runtime" "slices" + "strconv" "syscall" "time" @@ -325,7 +326,18 @@ func (a *execArtifact) cure(c *CureContext, hostNet bool) (err error) { } if a.paths[i].W { - z.OverlayEphemeral(b.dst, b.src...) + tempUpper, tempWork := temp.Append( + ".upper", strconv.Itoa(i), + ), temp.Append( + ".work", strconv.Itoa(i), + ) + if err = os.MkdirAll(tempUpper.String(), 0700); err != nil { + return + } + if err = os.MkdirAll(tempWork.String(), 0700); err != nil { + return + } + z.Overlay(b.dst, tempUpper, tempWork, b.src...) } else if len(b.src) == 1 { z.Bind(b.src[0], b.dst, 0) } else {