mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0010-v2v-fix-path-to-source-when-copying-files-from-guest.patch

a034fe
From 1fc6b5a843dce740fd766c3a65ae378730fc9126 Mon Sep 17 00:00:00 2001
a034fe
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= <tgolembi@redhat.com>
a034fe
Date: Fri, 8 Feb 2019 11:44:41 +0100
a034fe
Subject: [PATCH] v2v: fix path to source when copying files from guest tools
a034fe
 directory
a034fe
MIME-Version: 1.0
a034fe
Content-Type: text/plain; charset=UTF-8
a034fe
Content-Transfer-Encoding: 8bit
a034fe
a034fe
The debug message was slightly changed too to better match the similar
a034fe
message for ISO case. It refers to the root directory instead of the
a034fe
specific subdirectory inside guest tools.
a034fe
a034fe
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
a034fe
(cherry picked from commit f4bda5571a36da42bdc800c10f2c85cf20bf5c85)
a034fe
---
a034fe
 v2v/windows_virtio.ml | 7 ++++---
a034fe
 1 file changed, 4 insertions(+), 3 deletions(-)
a034fe
a034fe
diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml
a034fe
index f3302aed6..59b0bf493 100644
a034fe
--- a/v2v/windows_virtio.ml
a034fe
+++ b/v2v/windows_virtio.ml
a034fe
@@ -315,10 +315,11 @@ and copy_drivers g inspect driverdir =
a034fe
 and copy_from_virtio_win g inspect srcdir destdir filter missing =
a034fe
   let ret = ref [] in
a034fe
   if is_directory virtio_win then (
85dfdf
-    let dir = virtio_win // srcdir in
85dfdf
-    debug "windows: copy_from_virtio_win: guest tools source directory %s" dir;
a034fe
+    debug "windows: copy_from_virtio_win: guest tools source directory %s"
a034fe
+      virtio_win;
85dfdf
 
a034fe
-    if not (is_directory srcdir) then missing ()
85dfdf
+    let dir = virtio_win // srcdir in
a034fe
+    if not (is_directory dir) then missing ()
a034fe
     else (
a034fe
       let cmd = sprintf "cd %s && find -L -type f" (quote dir) in
a034fe
       let paths = external_command cmd in
a034fe
-- 
a034fe
2.21.0
a034fe