diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-22 09:50:05 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-22 09:50:05 +0100 |
commit | 5e4f9b86274faa9db19d36198008e8538e7ed789 (patch) | |
tree | 963f49f4b5818b7b76ea7f791a7e18569eea979e /apps | |
parent | ac799a40e3f78b09f1c1f8ea9cda4310f51f3940 (diff) | |
parent | f761733f17cb1bce9e3a82dd2059f5a139f8d68b (diff) | |
download | nextcloud-server-5e4f9b86274faa9db19d36198008e8538e7ed789.tar.gz nextcloud-server-5e4f9b86274faa9db19d36198008e8538e7ed789.zip |
Merge pull request #23440 from owncloud/fix_22286
apply retry wrapper to make sure that we always read/write a complete block
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/ftp.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php index 125888ef722..338e2c14fa4 100644 --- a/apps/files_external/lib/ftp.php +++ b/apps/files_external/lib/ftp.php @@ -30,6 +30,8 @@ namespace OC\Files\Storage; +use Icewind\Streams\RetryWrapper; + class FTP extends \OC\Files\Storage\StreamWrapper{ private $password; private $user; @@ -105,7 +107,8 @@ class FTP extends \OC\Files\Storage\StreamWrapper{ case 'ab': //these are supported by the wrapper $context = stream_context_create(array('ftp' => array('overwrite' => true))); - return fopen($this->constructUrl($path), $mode, false, $context); + $handle = fopen($this->constructUrl($path), $mode, false, $context); + return RetryWrapper::wrap($handle); case 'r+': case 'w+': case 'wb+': |