Fixing swift fopen by ensuring stream is a valid resource
This commit is contained in:
parent
cb9a4d4cdc
commit
41f1feaf23
1 changed files with 4 additions and 1 deletions
|
@ -323,7 +323,10 @@ class Swift extends \OC\Files\Storage\Common {
|
|||
$streamInterface->rewind();
|
||||
$stream = $streamInterface->getStream();
|
||||
stream_context_set_option($stream, 'swift','content', $streamInterface);
|
||||
if(is_resource($stream)) {
|
||||
return $stream;
|
||||
}
|
||||
return false;
|
||||
} catch (\Guzzle\Http\Exception\BadResponseException $e) {
|
||||
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue