File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -358,19 +358,19 @@ public static function removeApp($name,$delete =false){
358358 $ addonPath = Service::getAddonsNamePath ($ name );
359359 if (is_dir ($ appDir )){
360360 foreach (scandir ($ appDir ) as $ dir ){
361- $ sourcedir = $ appDir .DIRECTORY_SEPARATOR .$ dir ;
361+ $ sourcedir = $ appDir .DS .$ dir ;
362362 if (in_array ($ dir ,['. ' ,'.. ' ])) continue ;
363363 if (is_dir ($ sourcedir )) {
364364 FileHelper::copyDir ($ sourcedir , $ addonPath .'app ' . DS . $ name . DS .$ dir . DS ,$ delete );
365365 if ($ delete ) FileHelper::delDir ($ sourcedir );
366366 }else {
367+ if (!is_dir (dirname ($ addonPath .'app ' . DS . $ name ))) @mkdir ($ addonPath .'app ' . DS . $ name ,0755 ,true );
367368 @copy ($ sourcedir ,$ addonPath .'app ' .DS .$ name . DS .$ dir );
368369 if ($ delete ) unlink ($ sourcedir );
369370 }
370371 }
371372 @rmdir ($ appDir );
372373 }
373-
374374 // 移除插件基础静态资源目录
375375 $ destAssetsDir = Service::getDestAssetsDir ($ name );
376376 if (is_dir ($ destAssetsDir )) {
You can’t perform that action at this time.
0 commit comments