summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/files/view.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index b1333b4150c..6bf864c00ab 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -988,7 +988,7 @@ class View {
$this->updater->update($path, $extraParam);
}
- if ($operation === 'fopen') {
+ if ($operation === 'fopen' and $result) {
$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) {
if (in_array('write', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);