Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-04-08 18:29:34 +0300
committerRobin Appelman <robin@icewind.nl>2020-04-08 18:30:47 +0300
commit2340f4f2d57ddc2da50fb3682cdbe7b3373c57c5 (patch)
tree4bb280196776ff6616e967570ee45c03f340158e /apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php
parent981278a666370ce40d144ea8d7783e712605c1c0 (diff)
update icewind/smb to 3.2.3
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php')
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php
index 39eca8175a9..4e90e5a655d 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeWriteStream.php
@@ -61,7 +61,7 @@ class NativeWriteStream extends NativeStream {
private function flushWrite() {
rewind($this->writeBuffer);
- $this->state->write($this->handle, stream_get_contents($this->writeBuffer));
+ $this->state->write($this->handle, stream_get_contents($this->writeBuffer), $this->url);
$this->writeBuffer = fopen('php://memory', 'r+');
$this->bufferSize = 0;
}
@@ -79,8 +79,13 @@ class NativeWriteStream extends NativeStream {
}
public function stream_close() {
- $this->flushWrite();
- return parent::stream_close();
+ try {
+ $this->flushWrite();
+ $flushResult = true;
+ } catch (\Exception $e) {
+ $flushResult = false;
+ }
+ return parent::stream_close() && $flushResult;
}
public function stream_tell() {