From 15860185d99c074c54767aabe25c65e086cbc322 Mon Sep 17 00:00:00 2001 From: Fupan Li Date: Thu, 2 Aug 2018 16:14:11 +0800 Subject: [PATCH] virtcontainers: fix the issue of cleanup the vm's path To use the filepath.Join() instead of the simple string append method to form the file path, otherwise it will lose the "/" between the two parts. Fixes #543. Signed-off-by: Fupan Li --- virtcontainers/qemu.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtcontainers/qemu.go b/virtcontainers/qemu.go index b2cd734aa6..d157a563c1 100644 --- a/virtcontainers/qemu.go +++ b/virtcontainers/qemu.go @@ -579,7 +579,7 @@ func (q *qemu) stopSandbox() error { return err } - err = os.RemoveAll(RunVMStoragePath + q.id) + err = os.RemoveAll(filepath.Join(RunVMStoragePath, q.id)) if err != nil { q.Logger().WithError(err).Error("Fail to clean up vm directory") }