Skip to content

Commit

Permalink
Ensure only cloned copy removes failures
Browse files Browse the repository at this point in the history
  • Loading branch information
driskell committed Sep 8, 2020
1 parent 1c00168 commit ebf5b7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/CopyRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CopyRequest extends BaseRequest
/** @var resource<stream<plainfile>> */
private $fp;

private $success = false;
private $success = true;

protected static $defaultCurlOptions = array(
CURLOPT_HTTPGET => true,
Expand Down Expand Up @@ -72,6 +72,7 @@ public function getCurlOptions()
if ($this->fp) {
fclose($this->fp);
}
$this->success = false;
$this->fp = fopen($this->destination, 'wb');
if (!$this->fp) {
throw new FetchException(
Expand Down

0 comments on commit ebf5b7b

Please sign in to comment.