|
@@ -31,6 +31,8 @@ class AppearanceImPortForm extends Form implements LazyRenderable
|
|
$folder = $appearanceRs->folder;
|
|
$folder = $appearanceRs->folder;
|
|
$extractPath = resource_path().'/appearance/tmp';
|
|
$extractPath = resource_path().'/appearance/tmp';
|
|
$path = resource_path().'/appearance/'.$folder;
|
|
$path = resource_path().'/appearance/'.$folder;
|
|
|
|
+
|
|
|
|
+ $this->deleteDirectoryContents($extractPath);
|
|
|
|
|
|
$unzip = $this->unzip($file,$extractPath,$path);
|
|
$unzip = $this->unzip($file,$extractPath,$path);
|
|
if (!$unzip['status']) {
|
|
if (!$unzip['status']) {
|
|
@@ -139,7 +141,7 @@ class AppearanceImPortForm extends Form implements LazyRenderable
|
|
return ['status' => true];
|
|
return ['status' => true];
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
+
|
|
private function deleteDirectoryContents($dir)
|
|
private function deleteDirectoryContents($dir)
|
|
{
|
|
{
|
|
|
|
|