Selaa lähdekoodia

fix: missing file exists check in ClientDownload

M1Screw 2 vuotta sitten
vanhempi
sitoutus
1225076c28
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;
             }