[Libguestfs] [PATCH] v2v: fix directory check for virtio-win as directory
Pino Toscano
ptoscano at redhat.com
Thu Mar 21 11:01:18 UTC 2019
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190321/da5be8a3/attachment.sig>
More information about the Libguestfs
mailing list