mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-09 16:19:35 +01:00
fix unzip for nested plugin zips
This commit is contained in:
parent
cb5cf3c771
commit
fdfeee2150
@ -267,7 +267,7 @@ class PluginService
|
|||||||
File::deleteDirectory(plugin_path($pluginName));
|
File::deleteDirectory(plugin_path($pluginName));
|
||||||
}
|
}
|
||||||
|
|
||||||
$extractPath = $zip->locateName($pluginName) ? base_path('plugins') : plugin_path($pluginName);
|
$extractPath = $zip->locateName($pluginName . '/') !== false ? base_path('plugins') : plugin_path($pluginName);
|
||||||
|
|
||||||
if (!$zip->extractTo($extractPath)) {
|
if (!$zip->extractTo($extractPath)) {
|
||||||
$zip->close();
|
$zip->close();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user