Ne-Lexa 5 年之前
父节点
当前提交
bb1a607d0d
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/ZipFile.php

+ 3 - 1
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;
             }