Merge pull request #23442 from owncloud/fix_22286_9.0

[stable9] apply retry wrapper to make sure that we always read/write a complete block
This commit is contained in:
Thomas Müller 2016-03-22 16:23:54 +01:00
commit d60f39e4f2
1 changed files with 4 additions and 1 deletions

View File

@ -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+':