mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-05 11:36:56 +00:00
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 <lifupan@gmail.com>
This commit is contained in:
parent
fc0142ec8e
commit
15860185d9
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user