diff options
Diffstat (limited to 'lib/private/files/view.php')
-rw-r--r-- | lib/private/files/view.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index aa08a5f7cc9..f74b595c8da 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -324,7 +324,8 @@ class View { return false; } } else { - return $this->basicOperation('file_put_contents', $path, array('create', 'write'), $data); + $hooks = ($this->file_exists($path)) ? array('write') : array('create', 'write'); + return $this->basicOperation('file_put_contents', $path, $hooks, $data); } } |