Merge pull request #12868 from nextcloud/backport/12857/stable15

[stable15] Emit write update only once on touch
This commit is contained in:
Morris Jobke 2018-12-06 01:18:21 +01:00 committed by GitHub
commit 1e906fd15c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)) {