mirror of
https://github.com/criyle/go-sandbox.git
synced 2025-11-04 14:49:53 +08:00
Fix container.reset
This commit is contained in:
parent
5343e365c3
commit
a9733a4b7d
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user