Skip to content

Commit

Permalink
Only create asset during sync if it doesnt exist (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored Jun 14, 2024
1 parent 1964f17 commit cf05ed2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Commands/SyncAssets.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ private function processFolder(AssetContainer $container, $folder = '')

$this->info($file);

$asset = Facades\Asset::make()
->container($container->handle())
->path($file)
->saveQuietly();
if (! Facades\Asset::find($container->handle().'::'.$file)) {
$asset = Facades\Asset::make()
->container($container->handle())
->path($file)
->saveQuietly();
}
});

// delete any assets we have a db entry for that no longer exist
Expand Down

0 comments on commit cf05ed2

Please sign in to comment.