Blame 0101-dracut-install.c-really-add-a-inbetween-destdir-and-.patch

Harald Hoyer 414eba
From 24113c3a1126c7f0e46e7f3c0866e5f8c715775a Mon Sep 17 00:00:00 2001
Harald Hoyer 414eba
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 414eba
Date: Thu, 14 Jul 2016 13:53:24 +0200
Harald Hoyer 414eba
Subject: [PATCH] dracut-install.c: really add a "/" inbetween destdir and
Harald Hoyer 414eba
 target
Harald Hoyer 414eba
Harald Hoyer 414eba
using dracut-install with
Harald Hoyer 414eba
Harald Hoyer 414eba
find . -print0 | xargs dracut-install -D /tmp/test -a
Harald Hoyer 414eba
Harald Hoyer 414eba
resulted in /tmp/test./.... files
Harald Hoyer 414eba
---
Harald Hoyer 414eba
 install/dracut-install.c | 4 ++--
Harald Hoyer 414eba
 1 file changed, 2 insertions(+), 2 deletions(-)
Harald Hoyer 414eba
Harald Hoyer 414eba
diff --git a/install/dracut-install.c b/install/dracut-install.c
Harald Hoyer 414eba
index 9a0d53f..0cffa39 100644
Harald Hoyer 414eba
--- a/install/dracut-install.c
Harald Hoyer 414eba
+++ b/install/dracut-install.c
Harald Hoyer 414eba
@@ -617,7 +617,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res
Harald Hoyer 414eba
 
Harald Hoyer 414eba
         hashmap_put(items, i, i);
Harald Hoyer 414eba
 
Harald Hoyer 414eba
-        ret = asprintf(&fulldstpath, "%s%s", destrootdir, dst);
Harald Hoyer 414eba
+        ret = asprintf(&fulldstpath, "%s/%s", destrootdir, dst);
Harald Hoyer 414eba
         if (ret < 0) {
Harald Hoyer 414eba
                 log_error("Out of memory!");
Harald Hoyer 414eba
                 exit(EXIT_FAILURE);
Harald Hoyer 414eba
@@ -704,7 +704,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res
Harald Hoyer 414eba
                 if (lstat(fulldstpath, &sb) != 0) {
Harald Hoyer 414eba
                         _cleanup_free_ char *absdestpath = NULL;
Harald Hoyer 414eba
 
Harald Hoyer 414eba
-                        ret = asprintf(&absdestpath, "%s%s", destrootdir, abspath);
Harald Hoyer 414eba
+                        ret = asprintf(&absdestpath, "%s/%s", destrootdir, abspath);
Harald Hoyer 414eba
                         if (ret < 0) {
Harald Hoyer 414eba
                                 log_error("Out of memory!");
Harald Hoyer 414eba
                                 exit(EXIT_FAILURE);