Commit bb293b79 authored by nirgendswo's avatar nirgendswo

bugfix for path

parent a2d41602
......@@ -16,3 +16,4 @@ composer.phar
node_modules
.env
*.log
rysnc_exclude
......@@ -131,7 +131,11 @@ class ImageHelper
*/
protected function save($image, $filePathname)
{
$image->save(base_path().'/public/'.config('app.filesPublicPath').'/'.$filePathname);
$path = base_path().'/public/'.config('app.filesPublicPath').'/'.$filePathname;
if (!file_exists($path)) {
$image->save($path);
}
}
/**
......@@ -178,7 +182,10 @@ class ImageHelper
$absoluteDestinationPath = base_path().'/public/'.config('app.filesPublicPath').'/'.$destinationPath;
if (!file_exists($absoluteDestinationPath)) {
$absoluteSourcePath = base_path().'/'.config('app.filesPath').'/'.$sourcePath;
$image = new ImageResize($absoluteSourcePath);
if (file_exists($absoluteSourcePath)) {
$image = new ImageResize($absoluteSourcePath);
}
}
return $image;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment