summaryrefslogtreecommitdiffstats
path: root/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-26 12:02:48 +0200
committerGitHub <noreply@github.com>2017-08-26 12:02:48 +0200
commitae1ef8513766d846a800e20ec8320fa7921bf622 (patch)
treea8cb6c901401dd31ab541305933a049c60ac121d /apps/files_external/3rdparty/icewind/smb/src/NativeShare.php
parent4e6343a4fbe6145f54cd1be73100dbdb860f57aa (diff)
parentdb688d03224b388920cc8a9a64a21d553ac996e5 (diff)
downloadnextcloud-server-ae1ef8513766d846a800e20ec8320fa7921bf622.tar.gz
nextcloud-server-ae1ef8513766d846a800e20ec8320fa7921bf622.zip
Merge pull request #6157 from nextcloud/smb-2.0.2
update icewind/smb to 2.0.2
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/NativeShare.php')
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/NativeShare.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php b/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php
index 7efa34df370..228d9cd7d2e 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php
@@ -174,7 +174,7 @@ class NativeShare extends AbstractShare {
$sourceHandle = fopen($source, 'rb');
$targetHandle = $this->state->create($this->buildUrl($target));
- while ($data = fread($sourceHandle, 4096)) {
+ while ($data = fread($sourceHandle, NativeReadStream::CHUNK_SIZE)) {
$this->state->write($targetHandle, $data);
}
$this->state->close($targetHandle);
@@ -214,7 +214,7 @@ class NativeShare extends AbstractShare {
throw new InvalidResourceException('Failed opening remote file "' . $source . '" for reading');
}
- while ($data = $this->state->read($sourceHandle, 4096)) {
+ while ($data = $this->state->read($sourceHandle, NativeReadStream::CHUNK_SIZE)) {
fwrite($targetHandle, $data);
}
$this->state->close($sourceHandle);
@@ -233,7 +233,7 @@ class NativeShare extends AbstractShare {
public function read($source) {
$url = $this->buildUrl($source);
$handle = $this->state->open($url, 'r');
- return NativeStream::wrap($this->state, $handle, 'r', $url);
+ return NativeReadStream::wrap($this->state, $handle, 'r', $url);
}
/**
@@ -248,7 +248,7 @@ class NativeShare extends AbstractShare {
public function write($source) {
$url = $this->buildUrl($source);
$handle = $this->state->create($url);
- return NativeStream::wrap($this->state, $handle, 'w', $url);
+ return NativeWriteStream::wrap($this->state, $handle, 'w', $url);
}
/**