From bb1a607d0d6534471a08f3e0dc590e0d00baf5c9 Mon Sep 17 00:00:00 2001 From: Ne-Lexa Date: Sun, 16 May 2021 23:28:33 +0300 Subject: [PATCH] fix test --- src/ZipFile.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ZipFile.php b/src/ZipFile.php index b9c7aa4..e339919 100644 --- a/src/ZipFile.php +++ b/src/ZipFile.php @@ -515,7 +515,9 @@ class ZipFile implements ZipFileInterface try { $zipData->copyDataToStream($handle); } catch (ZipException $e) { - unlink($file); + if (is_file($file)) { + unlink($file); + } throw $e; }