summaryrefslogtreecommitdiffstats
path: root/lib/private/files/view.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-10-09 20:34:18 +0200
committerRobin Appelman <icewind@owncloud.com>2013-10-09 20:34:18 +0200
commit38c563dcdcfc46742a55be3b9b84a37512e203d3 (patch)
tree46a0caa7dd62da1ddbc8baedd5121090fd7a723b /lib/private/files/view.php
parent3a3819b30392547d6d4250830275cec64f7a08d4 (diff)
downloadnextcloud-server-38c563dcdcfc46742a55be3b9b84a37512e203d3.tar.gz
nextcloud-server-38c563dcdcfc46742a55be3b9b84a37512e203d3.zip
don't trigger the create hooks when if the file already exists for file_put_contents
Diffstat (limited to 'lib/private/files/view.php')
-rw-r--r--lib/private/files/view.php3
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);
}
}