$tmpFile = \OC_Helper::tmpFile($extension);
$target = fopen($tmpFile, 'w');
\OC_Helper::streamCopy($source, $target);
+ fclose($target);
return $tmpFile;
}
\OCP\Util::writeLog("webdav client", 'curl GET ' . curl_getinfo($curl, CURLINFO_EFFECTIVE_URL) . ' returned status code ' . $statusCode, \OCP\Util::ERROR);
}
curl_close($curl);
+ fclose($source);
$this->removeCachedFile($target);
}
$source = fopen($tmpFile, 'r');
if ($source) {
$this->file_put_contents($path, $source);
+ fclose($source);
unlink($tmpFile);
return true;
} else {