diff options
author | mbi <knox@users.noreply.github.com> | 2015-12-30 10:34:42 +0100 |
---|---|---|
committer | mbi <knox@users.noreply.github.com> | 2015-12-30 10:34:42 +0100 |
commit | 63974992f9a0244df0bbff891956deec7d35904b (patch) | |
tree | a4152551e4a4366957e06572cf04e4e0e941f38f /apps/files_external/lib/smb.php | |
parent | 1aff941be6ea3c09e86e234b7e2dc77fe4aa3696 (diff) | |
parent | 45c41e2b2cefa97c9d8c3bc73cfc088839640d1d (diff) | |
download | nextcloud-server-63974992f9a0244df0bbff891956deec7d35904b.tar.gz nextcloud-server-63974992f9a0244df0bbff891956deec7d35904b.zip |
Merge branch 'master' into master
Diffstat (limited to 'apps/files_external/lib/smb.php')
-rw-r--r-- | apps/files_external/lib/smb.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index a94840ead59..80b44a4cbdf 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -33,6 +33,7 @@ use Icewind\SMB\Exception\Exception; use Icewind\SMB\Exception\NotFoundException; use Icewind\SMB\NativeServer; use Icewind\SMB\Server; +use Icewind\Streams\CallbackWrapper; use Icewind\Streams\IteratorDirectory; use OC\Files\Filesystem; @@ -189,7 +190,10 @@ class SMB extends Common { return $this->share->read($fullPath); case 'w': case 'wb': - return $this->share->write($fullPath); + $source = $this->share->write($fullPath); + return CallBackWrapper::wrap($source, null, null, function () use ($fullPath) { + unset($this->statCache[$fullPath]); + }); case 'a': case 'ab': case 'r+': @@ -219,7 +223,8 @@ class SMB extends Common { } $source = fopen($tmpFile, $mode); $share = $this->share; - return CallBackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath, $share) { + return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath, $share) { + unset($this->statCache[$fullPath]); $share->put($tmpFile, $fullPath); unlink($tmpFile); }); |