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;
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+':
}
$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);
});