Daniel Supernault преди 6 години
родител
ревизия
047d89c1b2
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      app/Jobs/AvatarPipeline/AvatarOptimize.php

+ 1 - 1
app/Jobs/AvatarPipeline/AvatarOptimize.php

@@ -67,7 +67,7 @@ class AvatarOptimize implements ShouldQueue
 
 
     protected function deleteOldAvatar($new, $current)
     protected function deleteOldAvatar($new, $current)
     {
     {
-        if (storage_path('app/'.$new) == $current) {
+        if (storage_path('app/'.$new) == $current || $current == 'public/avatars/default.png') {
             return;
             return;
         }
         }
         if (is_file($current)) {
         if (is_file($current)) {