shenshihai 2 年之前
父节点
当前提交
98d079ffe1
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/PackageClass.php

+ 4 - 4
src/PackageClass.php

@@ -466,13 +466,13 @@ class PackageClass
 		$regAutorun = $app["distribute-root"]["register-autorun"] ? : array();
 		
 		$auto = new WinAutorun();
-		for($removeAutorun as $item){
+		foreach($removeAutorun as $item){
 			if(! $auto->remove($item['name']) ){
 				logError('failed to remove autorun',$item['name']);
 				return false;
 			}
 		}
-		for($regAutorun as $item){
+		foreach($regAutorun as $item){
 			$cmd = pathJoin($rootDir,$item['path']);
 			if(! $auto->register($item['name'],$cmd) ){
 				logError('failed to register autorun',$item['name']);
@@ -491,13 +491,13 @@ class PackageClass
 		$regShortcut = $app["distribute-root"]["register-shortcut"] ? : array();
 		
 		$sc = new WinDesktopShortcut();
-		for($removeShortcut as $item){
+		foreach($removeShortcut as $item){
 			if(! $sc->remove($item['name']) ){
 				logError('failed to remove shortcut',$item['name']);
 				return false;
 			}
 		}
-		for($regShortcut as $item){
+		foreach($regShortcut as $item){
 			$path = pathJoin($rootDir,$item['path']);
 			if(! $sc->register($item['name'],$path,$item['desc']) ){
 				logError('failed to register shortcut',$item['name']);