From: Harald Hoyer Date: Thu, 14 Jul 2016 11:53:24 +0000 (+0200) Subject: dracut-install.c: really add a "/" inbetween destdir and target X-Git-Tag: 045~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24113c3a1126c7f0e46e7f3c0866e5f8c715775a;p=thirdparty%2Fdracut.git dracut-install.c: really add a "/" inbetween destdir and target using dracut-install with find . -print0 | xargs dracut-install -D /tmp/test -a resulted in /tmp/test./.... files --- diff --git a/install/dracut-install.c b/install/dracut-install.c index 9a0d53f5d..0cffa3991 100644 --- a/install/dracut-install.c +++ b/install/dracut-install.c @@ -617,7 +617,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res hashmap_put(items, i, i); - ret = asprintf(&fulldstpath, "%s%s", destrootdir, dst); + ret = asprintf(&fulldstpath, "%s/%s", destrootdir, dst); if (ret < 0) { log_error("Out of memory!"); exit(EXIT_FAILURE); @@ -704,7 +704,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res if (lstat(fulldstpath, &sb) != 0) { _cleanup_free_ char *absdestpath = NULL; - ret = asprintf(&absdestpath, "%s%s", destrootdir, abspath); + ret = asprintf(&absdestpath, "%s/%s", destrootdir, abspath); if (ret < 0) { log_error("Out of memory!"); exit(EXIT_FAILURE);