Fix container.reset

This commit is contained in:
criyle 2020-12-17 22:27:18 -08:00
parent 5343e365c3
commit a9733a4b7d

View File

@ -3,6 +3,7 @@ package container
import ( import (
"fmt" "fmt"
"os" "os"
"path/filepath"
"syscall" "syscall"
"github.com/criyle/go-sandbox/pkg/unixsocket" "github.com/criyle/go-sandbox/pkg/unixsocket"
@ -62,7 +63,7 @@ func (c *containerServer) handleReset() error {
if !m.IsTmpFs() { if !m.IsTmpFs() {
continue continue
} }
if err := removeContents(m.Target); err != nil { if err := removeContents(filepath.Join("/", m.Target)); err != nil {
return c.sendErrorReply("reset: %v %v", m.Target, err) return c.sendErrorReply("reset: %v %v", m.Target, err)
} }
} }