From: Robin Appelman Date: Sun, 5 Feb 2012 19:50:35 +0000 (+0100) Subject: no post hooks for fopen X-Git-Tag: v4.0.0beta~440^2~73 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fd4b30ac6f81193cac1e558cc115802717aa88c1;p=nextcloud-server.git no post hooks for fopen --- diff --git a/lib/filesystemview.php b/lib/filesystemview.php index 27552d25f2b..a7003e84f19 100644 --- a/lib/filesystemview.php +++ b/lib/filesystemview.php @@ -317,9 +317,11 @@ class OC_FilesystemView { $result=$storage->$operation($interalPath); } $result=OC_FileProxy::runPostProxies($operation,$path,$result); - foreach($hooks as $hook){ - if($hook!='read'){ - OC_Hook::emit( OC_Filesystem::CLASSNAME, 'post_'.$hook, array( OC_Filesystem::signal_param_path => $path)); + if($operation!='fopen'){//no post hooks for fopen, the file stream is still open + foreach($hooks as $hook){ + if($hook!='read'){ + OC_Hook::emit( OC_Filesystem::CLASSNAME, 'post_'.$hook, array( OC_Filesystem::signal_param_path => $path)); + } } } return $result;