소스 검색

Throw when encountering invalid extensions

As a result of 1a03a74, we now have to handle our own invalid extension
checks.
Daniel Gempesaw 10 년 전
부모
커밋
f0d8905bae
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      lib/Selenium/Firefox/Profile.pm

+ 2 - 1
lib/Selenium/Firefox/Profile.pm

@@ -289,10 +289,11 @@ sub _extract_install_rdf {
             while ((my $status = $unzipped->read($buffer)) > 0) {
                 $install_rdf .= $buffer;
             }
+            return $install_rdf;
         }
     }
 
-    return $install_rdf;
+    croak 'Invalid Firefox extension: could not find install.rdf in the .XPI at: ' . $xpi
 }
 
 1;