elviss 2 лет назад
Родитель
Сommit
38a828d908
2 измененных файлов с 4 добавлено и 4 удалено
  1. 2 2
      src/PackageClass.php
  2. 2 2
      src/Utility.php

+ 2 - 2
src/PackageClass.php

@@ -240,7 +240,7 @@ class PackageClass
 			$fileName = $fileInfo['name'];
 
 			//下载文件到缓存区
-			$filePath = downloadToDir($toolDir,$ossHost,$repoName,$version,$fileName,$cacheDir);
+			$filePath = downloadToDir($toolDir,$ossHost,$repoName,$fileName,$cacheDir);
 			if(! $filePath ){
 				logError($repoName,"fetch module file failed",$fileName);
 				return false;
@@ -274,7 +274,7 @@ class PackageClass
 		foreach($commonFiles as $fileInfo){
 			$fileName = $fileInfo['name'];
 			//下载文件到缓存区
-			$filePath = downloadToDir($toolDir,$ossHost,$repoName,$version,$fileName,$cacheDir);
+			$filePath = downloadToDir($toolDir,$ossHost,$repoName,$fileName,$cacheDir);
 			if(! $filePath ){
 				logError($repoName,"fetch common file failed",$fileName);
 				return false;

+ 2 - 2
src/Utility.php

@@ -169,7 +169,7 @@ function loadConfig($cfgPath){
 }
 
 //多线程下载文件
-function downloadToDir($toolDir,$ossHost,$repoName,$repoVersion,$fileName,$targetDir){
+function downloadToDir($toolDir,$ossHost,$repoName,$fileName,$targetDir){
 	if (!file_exists($targetDir)){
 		mkdir($targetDir,0777,true);
 	}
@@ -180,7 +180,7 @@ function downloadToDir($toolDir,$ossHost,$repoName,$repoVersion,$fileName,$targe
 	}
 	$gopeed = getGoPeedPath($toolDir);
 	
-	$remoteUrl = pathJoin($ossHost,$repoName,$repoVersion,$fileName);
+	$remoteUrl = pathJoin($ossHost,$repoName,$fileName);
 	$cmd = $gopeed." -D=" . $targetDir . " " . $remoteUrl;
 	system($cmd, $ret);
 	if ($ret != 0) {