diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-12-05 21:29:48 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-12-05 21:29:48 +0100 |
commit | 2c6d36105c4be443a73eae1051d0ed2887dc609f (patch) | |
tree | 369fd14ecd56a1232236b640a0b9fa51ce8c70ed | |
parent | 1e0339775057201f54c87fb18e329c1fb94f7a60 (diff) | |
download | nextcloud-server-2c6d36105c4be443a73eae1051d0ed2887dc609f.tar.gz nextcloud-server-2c6d36105c4be443a73eae1051d0ed2887dc609f.zip |
Emit write update only once on touch
When a touch is done (i.e. when creating a new file in the node API)
The hooks contain 'write' and 'touch' (and the operation is touch as
well). This would cause a double write update. Which doesn't make sense.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r-- | lib/private/Files/View.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 19e38717803..21df67cf557 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1157,7 +1157,7 @@ class View { if ($result && in_array('delete', $hooks) and $result) { $this->removeUpdate($storage, $internalPath); } - if ($result && in_array('write', $hooks) and $operation !== 'fopen') { + if ($result && in_array('write', $hooks, true) && $operation !== 'fopen' && $operation !== 'touch') { $this->writeUpdate($storage, $internalPath); } if ($result && in_array('touch', $hooks)) { |