aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/pkg.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-03 20:56:11 +0900
committerOphestra <cat@gensokyo.uk>2026-01-03 20:56:11 +0900
commitdeda16da38187091ec59d28fb4fbc672ff71e70e (patch)
treebee9667be77586bb6ab4850b2a1f05d5e836f6e1 /internal/pkg/pkg.go
parent55465c6e72a1ca0a1d7fc719ca73d18531e911fe (diff)
internal/pkg: create work directory
This is used for artifacts that cure into directories. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/pkg.go')
-rw-r--r--internal/pkg/pkg.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/pkg/pkg.go b/internal/pkg/pkg.go
index 2796b4f6..73b93e3e 100644
--- a/internal/pkg/pkg.go
+++ b/internal/pkg/pkg.go
@@ -78,6 +78,10 @@ const (
// dirChecksum is the directory name appended to Cache.base for storing
// artifacts named after their [Checksum].
dirChecksum = "checksum"
+
+ // dirWork is the directory name appended to Cache.base for working
+ // directories created for [Cache.Store].
+ dirWork = "work"
)
// Cache is a support layer that implementations of [Artifact] can use to store
@@ -235,6 +239,7 @@ func New(base *check.Absolute) (*Cache, error) {
for _, name := range []string{
dirIdentifier,
dirChecksum,
+ dirWork,
} {
if err := os.MkdirAll(base.Append(name).String(), 0700); err != nil &&
!errors.Is(err, os.ErrExist) {