X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=perl%2Flib%2FSys%2FGuestfs%2FLib.pm;h=b5b3906c8fc49d2d077906888fbdf754001f8d0a;hb=2b43970c8c97f24b1f45c040c6963d30661fa514;hp=5428b104741e610e2e4ef01d807fef85023cc535;hpb=3765f97898a1194d96ab4124e1eb46e25701b3b2;p=libguestfs.git diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 5428b10..b5b3906 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -1825,7 +1825,7 @@ sub _inspect_initrd # Disregard old-style compressed ext2 files and only work with real # compressed cpio files, since cpio takes ages to (fail to) process anything # else. - if ($g->file ($path) =~ /cpio/) { + if ($g->exists($path) && $g->file($path) =~ /cpio/) { eval { @modules = $g->initrd_list ($path); };