From 8dea26094b0d9abe59ef6dcfa20bc34b29bf8550 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 9 Jun 2016 17:10:52 +0200 Subject: [PATCH] update icewind/streams to 0.4.1 --- apps/files_external/3rdparty/composer.json | 2 +- apps/files_external/3rdparty/composer.lock | 14 +++--- .../3rdparty/composer/autoload_classmap.php | 15 ------ .../3rdparty/composer/installed.json | 50 +++++++++---------- .../icewind/streams/src/RetryWrapper.php | 10 ++-- 5 files changed, 39 insertions(+), 52 deletions(-) diff --git a/apps/files_external/3rdparty/composer.json b/apps/files_external/3rdparty/composer.json index 72335c8d891..158478741ec 100644 --- a/apps/files_external/3rdparty/composer.json +++ b/apps/files_external/3rdparty/composer.json @@ -9,7 +9,7 @@ }, "require": { "icewind/smb": "1.1.0", - "icewind/streams": "0.4" + "icewind/streams": "0.4.1" } } diff --git a/apps/files_external/3rdparty/composer.lock b/apps/files_external/3rdparty/composer.lock index 7161ae19a2c..8f324299ff3 100644 --- a/apps/files_external/3rdparty/composer.lock +++ b/apps/files_external/3rdparty/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "8de0823d3d0a167ee24450a111cb67b9", - "content-hash": "6733058865c1765823b31cfbb24552e1", + "hash": "8ed3150b0b3e916ad66558242b4cf2a0", + "content-hash": "70722dcee13b3ac1c1951479b7431c97", "packages": [ { "name": "icewind/smb", @@ -51,16 +51,16 @@ }, { "name": "icewind/streams", - "version": "0.4.0", + "version": "0.4.1", "source": { "type": "git", "url": "https://github.com/icewind1991/Streams.git", - "reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3" + "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/Streams/zipball/9ca40274645a967ecc3408b0ca2e6255ead1d1d3", - "reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3", + "url": "https://api.github.com/repos/icewind1991/Streams/zipball/d3620e8dc410c86c2ba55579803679c4e0b289ac", + "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac", "shasum": "" }, "require": { @@ -88,7 +88,7 @@ } ], "description": "A set of generic stream wrappers", - "time": "2016-03-17 12:32:25" + "time": "2016-06-02 14:37:52" } ], "packages-dev": [], diff --git a/apps/files_external/3rdparty/composer/autoload_classmap.php b/apps/files_external/3rdparty/composer/autoload_classmap.php index 942dbce7336..0f9a43c6cd7 100644 --- a/apps/files_external/3rdparty/composer/autoload_classmap.php +++ b/apps/files_external/3rdparty/composer/autoload_classmap.php @@ -42,13 +42,6 @@ return array( 'Icewind\\SMB\\Server' => $vendorDir . '/icewind/smb/src/Server.php', 'Icewind\\SMB\\Share' => $vendorDir . '/icewind/smb/src/Share.php', 'Icewind\\SMB\\System' => $vendorDir . '/icewind/smb/src/System.php', - 'Icewind\\SMB\\Test\\AbstractShare' => $vendorDir . '/icewind/smb/tests/AbstractShare.php', - 'Icewind\\SMB\\Test\\NativeShare' => $vendorDir . '/icewind/smb/tests/NativeShare.php', - 'Icewind\\SMB\\Test\\NativeStream' => $vendorDir . '/icewind/smb/tests/NativeStream.php', - 'Icewind\\SMB\\Test\\Parser' => $vendorDir . '/icewind/smb/tests/Parser.php', - 'Icewind\\SMB\\Test\\Server' => $vendorDir . '/icewind/smb/tests/Server.php', - 'Icewind\\SMB\\Test\\Share' => $vendorDir . '/icewind/smb/tests/Share.php', - 'Icewind\\SMB\\Test\\TestCase' => $vendorDir . '/icewind/smb/tests/TestCase.php', 'Icewind\\SMB\\TimeZoneProvider' => $vendorDir . '/icewind/smb/src/TimeZoneProvider.php', 'Icewind\\Streams\\CallbackWrapper' => $vendorDir . '/icewind/streams/src/CallbackWrapper.php', 'Icewind\\Streams\\Directory' => $vendorDir . '/icewind/streams/src/Directory.php', @@ -60,14 +53,6 @@ return array( 'Icewind\\Streams\\Path' => $vendorDir . '/icewind/streams/src/Path.php', 'Icewind\\Streams\\RetryWrapper' => $vendorDir . '/icewind/streams/src/RetryWrapper.php', 'Icewind\\Streams\\SeekableWrapper' => $vendorDir . '/icewind/streams/src/SeekableWrapper.php', - 'Icewind\\Streams\\Tests\\DirectoryFilter' => $vendorDir . '/icewind/streams/tests/DirectoryFilter.php', - 'Icewind\\Streams\\Tests\\DirectoryWrapper' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php', - 'Icewind\\Streams\\Tests\\DirectoryWrapperDummy' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php', - 'Icewind\\Streams\\Tests\\DirectoryWrapperNull' => $vendorDir . '/icewind/streams/tests/DirectoryWrapper.php', - 'Icewind\\Streams\\Tests\\PartialWrapper' => $vendorDir . '/icewind/streams/tests/RetryWrapper.php', - 'Icewind\\Streams\\Tests\\RetryWrapper' => $vendorDir . '/icewind/streams/tests/RetryWrapper.php', - 'Icewind\\Streams\\Tests\\SeekableWrapper' => $vendorDir . '/icewind/streams/tests/SeekableWrapper.php', - 'Icewind\\Streams\\Tests\\UrlCallBack' => $vendorDir . '/icewind/streams/tests/UrlCallBack.php', 'Icewind\\Streams\\Url' => $vendorDir . '/icewind/streams/src/Url.php', 'Icewind\\Streams\\UrlCallback' => $vendorDir . '/icewind/streams/src/UrlCallBack.php', 'Icewind\\Streams\\Wrapper' => $vendorDir . '/icewind/streams/src/Wrapper.php', diff --git a/apps/files_external/3rdparty/composer/installed.json b/apps/files_external/3rdparty/composer/installed.json index 31c602de3ca..127d2bd3a19 100644 --- a/apps/files_external/3rdparty/composer/installed.json +++ b/apps/files_external/3rdparty/composer/installed.json @@ -1,33 +1,34 @@ [ { - "name": "icewind/streams", - "version": "0.4.0", - "version_normalized": "0.4.0.0", + "name": "icewind/smb", + "version": "v1.1.0", + "version_normalized": "1.1.0.0", "source": { "type": "git", - "url": "https://github.com/icewind1991/Streams.git", - "reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3" + "url": "https://github.com/icewind1991/SMB.git", + "reference": "822f924967c68228555cea84ea44765f8e85c601" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/Streams/zipball/9ca40274645a967ecc3408b0ca2e6255ead1d1d3", - "reference": "9ca40274645a967ecc3408b0ca2e6255ead1d1d3", + "url": "https://api.github.com/repos/icewind1991/SMB/zipball/822f924967c68228555cea84ea44765f8e85c601", + "reference": "822f924967c68228555cea84ea44765f8e85c601", "shasum": "" }, "require": { + "icewind/streams": ">=0.2.0", "php": ">=5.3" }, "require-dev": { "phpunit/phpunit": "^4.8", "satooshi/php-coveralls": "v1.0.0" }, - "time": "2016-03-17 12:32:25", + "time": "2016-04-26 13:26:39", "type": "library", - "installation-source": "dist", + "installation-source": "source", "autoload": { "psr-4": { - "Icewind\\Streams\\Tests\\": "tests/", - "Icewind\\Streams\\": "src/" + "Icewind\\SMB\\": "src/", + "Icewind\\SMB\\Test\\": "tests/" } }, "notification-url": "https://packagist.org/downloads/", @@ -40,38 +41,37 @@ "email": "icewind@owncloud.com" } ], - "description": "A set of generic stream wrappers" + "description": "php wrapper for smbclient and libsmbclient-php" }, { - "name": "icewind/smb", - "version": "v1.1.0", - "version_normalized": "1.1.0.0", + "name": "icewind/streams", + "version": "0.4.1", + "version_normalized": "0.4.1.0", "source": { "type": "git", - "url": "https://github.com/icewind1991/SMB.git", - "reference": "822f924967c68228555cea84ea44765f8e85c601" + "url": "https://github.com/icewind1991/Streams.git", + "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/SMB/zipball/822f924967c68228555cea84ea44765f8e85c601", - "reference": "822f924967c68228555cea84ea44765f8e85c601", + "url": "https://api.github.com/repos/icewind1991/Streams/zipball/d3620e8dc410c86c2ba55579803679c4e0b289ac", + "reference": "d3620e8dc410c86c2ba55579803679c4e0b289ac", "shasum": "" }, "require": { - "icewind/streams": ">=0.2.0", "php": ">=5.3" }, "require-dev": { "phpunit/phpunit": "^4.8", "satooshi/php-coveralls": "v1.0.0" }, - "time": "2016-04-26 13:26:39", + "time": "2016-06-02 14:37:52", "type": "library", - "installation-source": "source", + "installation-source": "dist", "autoload": { "psr-4": { - "Icewind\\SMB\\": "src/", - "Icewind\\SMB\\Test\\": "tests/" + "Icewind\\Streams\\Tests\\": "tests/", + "Icewind\\Streams\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -84,6 +84,6 @@ "email": "icewind@owncloud.com" } ], - "description": "php wrapper for smbclient and libsmbclient-php" + "description": "A set of generic stream wrappers" } ] diff --git a/apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php b/apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php index 84b43f6bd02..8238f19f7c9 100644 --- a/apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php +++ b/apps/files_external/3rdparty/icewind/streams/src/RetryWrapper.php @@ -44,7 +44,7 @@ class RetryWrapper extends Wrapper { $result = parent::stream_read($count); $bytesReceived = strlen($result); - while ($bytesReceived < $count && !$this->stream_eof()) { + while (strlen($result) > 0 && $bytesReceived < $count && !$this->stream_eof()) { $result .= parent::stream_read($count - $bytesReceived); $bytesReceived = strlen($result); } @@ -54,11 +54,13 @@ class RetryWrapper extends Wrapper { public function stream_write($data) { $bytesToSend = strlen($data); - $result = parent::stream_write($data); + $bytesWritten = parent::stream_write($data); + $result = $bytesWritten; - while ($result < $bytesToSend && !$this->stream_eof()) { + while ($bytesWritten > 0 && $result < $bytesToSend && !$this->stream_eof()) { $dataLeft = substr($data, $result); - $result += parent::stream_write($dataLeft); + $bytesWritten = parent::stream_write($dataLeft); + $result += $bytesWritten; } return $result; -- 2.39.5