Skip to content

Commit

Permalink
fix path not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed Oct 26, 2024
1 parent 1b27d39 commit 198cd51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Services/SaveScan.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Lang;
use TomatoPHP\FilamentTranslations\Models\Translation;

Expand All @@ -19,7 +20,9 @@ public function __construct()
public function save()
{
$scanner = app(Scan::class);
collect($this->paths)->each(function ($path) use ($scanner) {
collect($this->paths)->filter(function($path) {
return File::exists($path);
})->each(function ($path) use ($scanner) {
$scanner->addScannedPath($path);
});

Expand Down

0 comments on commit 198cd51

Please sign in to comment.