From 4d7d82fe8cba32a463839a9dee70bd9446476625 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 26 Oct 2011 17:12:51 +0300 Subject: [PATCH] kvm tools: Fix kvm__set_dir() to include trailing slash All of our code expects kvm__get_dir() to return a path with a trailing slash. This fixes "kvm run" and "kvm setup" making directories such as "$HOME/.kvmtoolsdefault" for guest rootfs. Signed-off-by: Pekka Enberg --- tools/kvm/kvm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index c9297577569e..d953b945e0a2 100644 --- a/tools/kvm/kvm.c +++ b/tools/kvm/kvm.c @@ -94,6 +94,8 @@ static void set_dir(const char *fmt, va_list args) if (!realpath(tmp, kvm_dir)) die("Unable to set KVM tool directory"); + + strcat(kvm_dir, "/"); } void kvm__set_dir(const char *fmt, ...) -- 2.39.5