diff --git a/pkg/apk/fs/memfs.go b/pkg/apk/fs/memfs.go index acce23933..a6e50b405 100644 --- a/pkg/apk/fs/memfs.go +++ b/pkg/apk/fs/memfs.go @@ -168,7 +168,7 @@ func (m *memFS) MkdirAll(path string, perm fs.FileMode) error { traversed := make([]string, 0) anode := m.tree for _, part := range parts { - if part == "" { + if part == "" || part == "." { continue } if anode.children == nil { diff --git a/pkg/build/busybox.go b/pkg/build/busybox.go index f47c28967..3a659b2e7 100644 --- a/pkg/build/busybox.go +++ b/pkg/build/busybox.go @@ -107,7 +107,12 @@ func installBusyboxLinks(fsys apkfs.FullFS, installed []*apk.InstalledPackage) e if link == busybox || link == "" { continue } + dir := filepath.Dir(link) + if dir == "." { + continue + } + if err := fsys.MkdirAll(dir, 0755); err != nil { return fmt.Errorf("creating directory %s: %w", dir, err) }