浏览代码

fix: missing file exists check in ClientDownload

M1Screw 2 年之前
父节点
当前提交
1225076c28
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Command/ClientDownload.php

+ 1 - 1
src/Command/ClientDownload.php

@@ -263,7 +263,7 @@ final class ClientDownload extends Command
 
             echo '- 正在删除旧版本文件...' . PHP_EOL;
 
-            if (! unlink($filePath)) {
+            if (file_exists($filePath) && ! unlink($filePath)) {
                 echo '- 删除旧版本文件失败,此任务跳过,请检查权限' . PHP_EOL;
                 continue;
             }