From ee244629b9c7f4e5c423cf4e57690556f6d9cb2d Mon Sep 17 00:00:00 2001 From: Julian Prieber Date: Wed, 3 May 2023 18:44:50 +0200 Subject: [PATCH] Update finishing.blade.php --- resources/views/components/finishing.blade.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/resources/views/components/finishing.blade.php b/resources/views/components/finishing.blade.php index be3ae0e..462e0c1 100644 --- a/resources/views/components/finishing.blade.php +++ b/resources/views/components/finishing.blade.php @@ -153,7 +153,7 @@ use App\Models\Page; // Moves all previous images to the new path -if (is_dir(base_path('assets/img'))) { +try{if (is_dir(base_path('assets/img'))) { $files = File::files(base_path('img')); foreach ($files as $file) { $filename = $file->getFilename(); @@ -161,7 +161,8 @@ if (is_dir(base_path('assets/img'))) { if (!File::exists($destination)) { if (!$file->isDir()) { File::move($file, $destination);}}}} -if (is_dir(base_path('assets/img/background-img'))) { + }catch(exception $e) {} +try{if (is_dir(base_path('assets/img/background-img'))) { $files = File::files(base_path('img/background-img')); foreach ($files as $file) { $filename = $file->getFilename(); @@ -169,7 +170,8 @@ if (is_dir(base_path('assets/img/background-img'))) { if (!File::exists($destination)) { if (!$file->isDir()) { File::move($file, $destination);}}}} -if (is_dir(base_path('littlelink/images'))) { + }catch(exception $e) {} +try{if (is_dir(base_path('littlelink/images'))) { $files = File::files(base_path('littlelink/images')); foreach ($files as $file) { $filename = $file->getFilename(); @@ -177,7 +179,8 @@ if (is_dir(base_path('littlelink/images'))) { if (!File::exists($destination)) { if (!$file->isDir()) { File::move($file, $destination);}}}} -if (is_dir(base_path('littlelink/images'))) { + }catch(exception $e) {} +try{if (is_dir(base_path('littlelink/images'))) { $files = File::files(base_path('littlelink/images')); foreach ($files as $file) { $filename = $file->getFilename(); @@ -185,7 +188,8 @@ if (is_dir(base_path('littlelink/images'))) { if (!File::exists($destination)) { if (!$file->isDir()) { File::move($file, $destination);}}}} -if (is_dir(base_path('studio/favicon/icons'))) { + }catch(exception $e) {} +try{if (is_dir(base_path('studio/favicon/icons'))) { $files = File::files(base_path('studio/favicon/icons')); foreach ($files as $file) { $filename = $file->getFilename(); @@ -193,6 +197,7 @@ if (is_dir(base_path('studio/favicon/icons'))) { if (!File::exists($destination)) { if (!$file->isDir()) { File::move($file, $destination);}}}} + }catch(exception $e) {} // Changes saved profile images from littlelink_name to IDs.