On Wednesday, 20 March 2019 23:26:44 CET Richard W.M. Jones wrote:
On Wed, Mar 20, 2019 at 07:08:45PM +0100, Pino Toscano wrote:
> When trying to install files from virtio-win as directory, check for
> directory existance using absolute paths. Otherwise, is_directory is
> called on relative paths such as "linux/el7" which obviously do not
> exist.
>
> Fixes commit 1c85b64c1c3a4d5267b952102375cb78f18a85c4.
> ---
> v2v/windows_virtio.ml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml
> index 92bf3ec60..3a3559cb2 100644
> --- a/v2v/windows_virtio.ml
> +++ b/v2v/windows_virtio.ml
> @@ -311,7 +311,7 @@ and copy_from_virtio_win g inspect srcdir destdir filter missing
=
> let dir = virtio_win // srcdir in
> debug "windows: copy_from_virtio_win: guest tools source directory
%s" dir;
>
> - if not (is_directory srcdir) then missing ()
> + if not (is_directory dir) then missing ()
> else (
> let cmd = sprintf "cd %s && find -L -type f" (quote dir)
in
> let paths = external_command cmd in
I think Tomas suggested something like this before:
https://www.redhat.com/archives/libguestfs/2019-January/msg00218.html
Indeed, let's go with his patch then (not sure why it was not committed
yet).
--
Pino Toscano