Skip to content

Commit

Permalink
Merge branch 'ntr/5.7/fix-plugin-download' into '5.7'
Browse files Browse the repository at this point in the history
NTR - Fix plugin download

See merge request shopware/5/product/shopware!548
  • Loading branch information
shyim committed May 12, 2021
2 parents 4152b26 + e963d8a commit 693395e
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,20 @@ public function downloadFile($sourceUri, $destinationUri, $totalSize, $hash)
$this->verifyHash($partFile, $hash);
// close local file connections before move for windows
$partFilePath = $partFile->getPathname();
fclose($destination);

if (is_resource($destination)) {
fclose($destination);
}

unset($partFile);
$this->moveFile($partFilePath, $destinationUri);
}

// close local file
fclose($destination);
if (is_resource($destination)) {
fclose($destination);
}

unset($partFile);

return $size;
Expand Down

0 comments on commit 693395e

Please sign in to comment.