summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-03-07 12:15:32 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-03-07 12:15:32 +0100
commitbb3c3539ccf665ac0504e14be23bf05b508969e0 (patch)
tree87612f31cd8649f415fc9b5e790a285ca63c9312 /apps/files_external
parentc1c594f2ada4d18d0c73e0f590a2afcdf2032428 (diff)
downloadnextcloud-server-bb3c3539ccf665ac0504e14be23bf05b508969e0.tar.gz
nextcloud-server-bb3c3539ccf665ac0504e14be23bf05b508969e0.zip
Have streams of files_external in sync
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/3rdparty/composer.json2
-rw-r--r--apps/files_external/3rdparty/composer.lock12
-rw-r--r--apps/files_external/3rdparty/composer/installed.json12
-rw-r--r--apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php18
4 files changed, 28 insertions, 16 deletions
diff --git a/apps/files_external/3rdparty/composer.json b/apps/files_external/3rdparty/composer.json
index 897234dfce0..6c23067c4a5 100644
--- a/apps/files_external/3rdparty/composer.json
+++ b/apps/files_external/3rdparty/composer.json
@@ -8,7 +8,7 @@
"classmap-authoritative": true
},
"require": {
- "icewind/streams": "0.6.1",
+ "icewind/streams": "0.7.1",
"icewind/smb": "3.1.1"
}
}
diff --git a/apps/files_external/3rdparty/composer.lock b/apps/files_external/3rdparty/composer.lock
index 69da480d19f..491b73fa1f4 100644
--- a/apps/files_external/3rdparty/composer.lock
+++ b/apps/files_external/3rdparty/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "dd320be9cd87742d53b4384bf3df9c42",
+ "content-hash": "5639a09feff2318b1b69e11a10a81e7d",
"packages": [
{
"name": "icewind/smb",
@@ -50,16 +50,16 @@
},
{
"name": "icewind/streams",
- "version": "0.6.1",
+ "version": "v0.7.1",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/Streams.git",
- "reference": "0a78597117d8a02937ea05206f219294449fb06e"
+ "reference": "4db3ed6c366e90b958d00e1d4c6360a9b39b2121"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/icewind1991/Streams/zipball/0a78597117d8a02937ea05206f219294449fb06e",
- "reference": "0a78597117d8a02937ea05206f219294449fb06e",
+ "url": "https://api.github.com/repos/icewind1991/Streams/zipball/4db3ed6c366e90b958d00e1d4c6360a9b39b2121",
+ "reference": "4db3ed6c366e90b958d00e1d4c6360a9b39b2121",
"shasum": ""
},
"require": {
@@ -87,7 +87,7 @@
}
],
"description": "A set of generic stream wrappers",
- "time": "2018-04-24T09:07:38+00:00"
+ "time": "2019-02-15T12:57:29+00:00"
}
],
"packages-dev": [],
diff --git a/apps/files_external/3rdparty/composer/installed.json b/apps/files_external/3rdparty/composer/installed.json
index b6c0b4d751c..18ee9e5431f 100644
--- a/apps/files_external/3rdparty/composer/installed.json
+++ b/apps/files_external/3rdparty/composer/installed.json
@@ -45,17 +45,17 @@
},
{
"name": "icewind/streams",
- "version": "0.6.1",
- "version_normalized": "0.6.1.0",
+ "version": "v0.7.1",
+ "version_normalized": "0.7.1.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/Streams.git",
- "reference": "0a78597117d8a02937ea05206f219294449fb06e"
+ "reference": "4db3ed6c366e90b958d00e1d4c6360a9b39b2121"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/icewind1991/Streams/zipball/0a78597117d8a02937ea05206f219294449fb06e",
- "reference": "0a78597117d8a02937ea05206f219294449fb06e",
+ "url": "https://api.github.com/repos/icewind1991/Streams/zipball/4db3ed6c366e90b958d00e1d4c6360a9b39b2121",
+ "reference": "4db3ed6c366e90b958d00e1d4c6360a9b39b2121",
"shasum": ""
},
"require": {
@@ -65,7 +65,7 @@
"phpunit/phpunit": "^4.8",
"satooshi/php-coveralls": "v1.0.0"
},
- "time": "2018-04-24T09:07:38+00:00",
+ "time": "2019-02-15T12:57:29+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
diff --git a/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php
index 4eef55681c7..67f9110d100 100644
--- a/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php
+++ b/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php
@@ -45,6 +45,11 @@ class CallbackWrapper extends Wrapper {
protected $readDirCallBack;
/**
+ * @var callable
+ */
+ protected $preCloseCallback;
+
+ /**
* Wraps a stream with the provided callbacks
*
* @param resource $source
@@ -56,14 +61,15 @@ class CallbackWrapper extends Wrapper {
*
* @throws \BadMethodCallException
*/
- public static function wrap($source, $read = null, $write = null, $close = null, $readDir = null) {
+ public static function wrap($source, $read = null, $write = null, $close = null, $readDir = null, $preClose = null) {
$context = stream_context_create(array(
'callback' => array(
'source' => $source,
'read' => $read,
'write' => $write,
'close' => $close,
- 'readDir' => $readDir
+ 'readDir' => $readDir,
+ 'preClose' => $preClose,
)
));
return Wrapper::wrapSource($source, $context, 'callback', '\Icewind\Streams\CallbackWrapper');
@@ -76,6 +82,7 @@ class CallbackWrapper extends Wrapper {
$this->writeCallback = $context['write'];
$this->closeCallback = $context['close'];
$this->readDirCallBack = $context['readDir'];
+ $this->preCloseCallback = $context['preClose'];
return true;
}
@@ -90,7 +97,7 @@ class CallbackWrapper extends Wrapper {
public function stream_read($count) {
$result = parent::stream_read($count);
if (is_callable($this->readCallback)) {
- call_user_func($this->readCallback, $count);
+ call_user_func($this->readCallback, strlen($result));
}
return $result;
}
@@ -104,6 +111,11 @@ class CallbackWrapper extends Wrapper {
}
public function stream_close() {
+ if (is_callable($this->preCloseCallback)) {
+ call_user_func($this->preCloseCallback, $this->loadContext('callback')['source']);
+ // prevent further calls by potential PHP 7 GC ghosts
+ $this->preCloseCallback = null;
+ }
$result = parent::stream_close();
if (is_callable($this->closeCallback)) {
call_user_func($this->closeCallback);