Skip to content

Commit

Permalink
fix(web/local): upload assets heads returns true (#1105)
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidmattei authored Dec 11, 2024
1 parent 2ac5926 commit b19256b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ private function uploadEmsArchive(): string
$archive = Archive::fromDirectory($directory, $algo);
$progressBar = $this->io->createProgressBar($archive->getCount());
foreach ($this->coreApi->file()->heads(...$archive->getHashes()) as $hash) {
if (true === $hash) {
$progressBar->advance();
continue;
}

$file = $archive->getFirstFileByHash($hash);
$uploadHash = $this->coreApi->file()->uploadFile($directory.DIRECTORY_SEPARATOR.$file->filename);
if ($uploadHash !== $hash) {
Expand Down

0 comments on commit b19256b

Please sign in to comment.