diff options
Diffstat (limited to 'lib/private/files/node/file.php')
-rw-r--r-- | lib/private/files/node/file.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/private/files/node/file.php b/lib/private/files/node/file.php index 81e251c20b8..1c47294cdae 100644 --- a/lib/private/files/node/file.php +++ b/lib/private/files/node/file.php @@ -34,6 +34,7 @@ class File extends Node implements \OCP\Files\File { if ($this->checkPermissions(\OCP\Constants::PERMISSION_UPDATE)) { $this->sendHooks(array('preWrite')); $this->view->file_put_contents($this->path, $data); + $this->fileInfo = null; $this->sendHooks(array('postWrite')); } else { throw new NotPermittedException(); @@ -41,13 +42,6 @@ class File extends Node implements \OCP\Files\File { } /** - * @return string - */ - public function getMimeType() { - return $this->view->getMimeType($this->path); - } - - /** * @param string $mode * @return resource * @throws \OCP\Files\NotPermittedException @@ -94,6 +88,7 @@ class File extends Node implements \OCP\Files\File { $nonExisting = new NonExistingFile($this->root, $this->view, $this->path); $this->root->emit('\OC\Files', 'postDelete', array($nonExisting)); $this->exists = false; + $this->fileInfo = null; } else { throw new NotPermittedException(); } @@ -138,6 +133,7 @@ class File extends Node implements \OCP\Files\File { $this->root->emit('\OC\Files', 'postRename', array($this, $targetNode)); $this->root->emit('\OC\Files', 'postWrite', array($targetNode)); $this->path = $targetPath; + $this->fileInfo = null; return $targetNode; } else { throw new NotPermittedException(); |