Skip to content
Snippets Groups Projects
Commit 5e4f9b86 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #23440 from owncloud/fix_22286

apply retry wrapper to make sure that we always read/write a complete block
parents ac799a40 f761733f
No related branches found
No related tags found
No related merge requests found
......@@ -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+':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment