changeset 178:808462de684a puppet-3.6

Handle possible "undef" from FileMagic that causes warnings
author IBBoard <dev@ibboard.co.uk>
date Sat, 12 May 2018 10:05:12 +0100
parents 1b605c38b375
children 89cd717361fd
files common/spamassassin-vba-macro-master/ole2macro.pm
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/common/spamassassin-vba-macro-master/ole2macro.pm	Mon May 07 09:40:41 2018 +0100
+++ b/common/spamassassin-vba-macro-master/ole2macro.pm	Sat May 12 10:05:12 2018 +0100
@@ -121,7 +121,7 @@
     if ($has_mimeinfo){
         my $contents_scalar = new IO::Scalar \$part->decode($mime_max_read_size);
         my $mime_type = File::MimeInfo::Magic::magic($contents_scalar);
-        return($mime_type eq "application/zip");
+        return(defined $mime_type && $mime_type eq "application/zip");
     }else{
         return($name =~ /(?:zip)$/);
     }