shenshihai 2 år sedan
förälder
incheckning
15c01bac67
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      src/PackageClass.php

+ 1 - 1
src/PackageClass.php

@@ -370,6 +370,7 @@ class PackageClass
 			$fileName = $fileInfo['path'];
 			$targetName = $fileInfo['target'];
 			$filePath = pathJoin($rootDir,$fileName);
+			$targetPath = pathJoin($rootDir,$targetName);
 			if(! file_exists($filePath) ){
 				logError("failed to copy file, file not exists.",$filePath);
 				return false;
@@ -377,7 +378,6 @@ class PackageClass
 			if(!$fileInfo['override'] && file_exists($targetPath)){
 				logInfo("skip copy file, file already exists",$targetPath);
 			}
-			$targetPath = pathJoin($rootDir,$targetName);
 			if( filedirCopy($filePath,$targetPath) ){
 				logInfo("succeeded to copy file",$fileName," -> ",$targetName);
 			}