Browse Source

Use the default storage disk when none is defined

pull/3/head
Richard Dern 3 months ago
parent
commit
642a613b3f
  1. 3
      package/Analyzer.php

3
package/Analyzer.php

@ -8,6 +8,7 @@ use Cyca\Fetcher\Facades\Fetcher;
use Cyca\Helpers\Helpers\GenericObject;
use Exception;
use Illuminate\Contracts\Filesystem\Filesystem;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use League\Flysystem\FileNotFoundException;
@ -193,7 +194,7 @@ class Analyzer extends GenericObject
$this->sourcePath = $file;
if (empty($this->fileSystem)) {
throw new Exception("You need to define a filesystem before analyzing a file");
$this->setFilesystem(Storage::disk(config('analyzer.storage_disk')));
}
if (!$this->fileSystem->exists($file)) {

Loading…
Cancel
Save