elviss 2 năm trước cách đây
mục cha
commit
b3c343dd98
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      src/Utility.php

+ 5 - 5
src/Utility.php

@@ -314,13 +314,13 @@ function loadConfig($cfgPath){
 
 //检测文件是否需要下载
 function isFileCached($filePath,$fileMd5,$fileSize){
-	if( file_exists($targetPath) ) {
-		return true;
+	if(! file_exists($filePath) ) {
+		return false;
 	}
-	if( filesize($targetPath) == $fileSize){
-		return true;
+	if( filesize($filePath) != $fileSize){
+		return false;
 	}
-	return false;
+	return true;
 }
 //多线程下载文件
 function downloadToDir($toolDir,$downClient,$ossHost,$repoName,$fileName,$fileMd5,$fileSize,$targetDir){