From 2d63fd77de1cbfdb0a3474cadf99f1dcf4962d5f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 13 May 2015 14:07:18 +0200 Subject: dont apply callback wrapper when fopen failed --- lib/private/files/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private') 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); -- cgit v1.2.3