]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-install.c: really add a "/" inbetween destdir and target
authorHarald Hoyer <harald@redhat.com>
Thu, 14 Jul 2016 11:53:24 +0000 (13:53 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 14 Jul 2016 11:54:04 +0000 (13:54 +0200)
using dracut-install with

find . -print0 | xargs dracut-install -D /tmp/test -a

resulted in /tmp/test./.... files

install/dracut-install.c

index 9a0d53f5df4aea42a69b9fd7deef5cb91ff621e1..0cffa399105a3a4d3a772b6b9e6295a0f65a64fc 100644 (file)
@@ -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);