Skip to content

Commit b51be23

Browse files
authored
Merge pull request #118 from GiantCowFilms/patch-1
Optional parameter to allow manual definition of zip type.
2 parents 5ffdc93 + 99620ba commit b51be23

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Zippy.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@ public function create($path, $files = null, $recursive = true, $type = null)
8080
*
8181
* @throws RuntimeException In case of failure
8282
*/
83-
public function open($path)
83+
public function open($path, $type = null)
8484
{
85-
$type = $this->guessAdapterExtension($path);
85+
if (null === $type) {
86+
$type = $this->guessAdapterExtension($path);
87+
}
8688

8789
try {
8890
return $this

0 commit comments

Comments
 (0)