git 2 years ago
parent
commit
834e00a403
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Home/Lib/Action/CronAction.class.php

+ 5 - 1
Home/Lib/Action/CronAction.class.php

@@ -25,7 +25,11 @@ class CronAction extends Action {
 				}else{
 					$zip = $this->zip($path_parts['filename'], $path_parts['dirname']);
 				}
-				if ($zip && filesize($zip) > 0) {//压缩完成
+				if ($zip) {//压缩完成
+					if(filesize($zip) <= 0){
+						@unlink($zip);
+						continue;
+					}
 					//echo '压缩用时:'.(time()-$start).PHP_EOL;
 					$tagetDat = $targetDir . '/' . $path_parts['filename'] . '.zip';
 					//echo $tagetDat . PHP_EOL;