]> source.dussan.org Git - nextcloud-server.git/commitdiff
no post hooks for fopen
authorRobin Appelman <icewind@owncloud.com>
Sun, 5 Feb 2012 19:50:35 +0000 (20:50 +0100)
committerRobin Appelman <icewind@owncloud.com>
Tue, 21 Feb 2012 19:48:48 +0000 (20:48 +0100)
lib/filesystemview.php

index 27552d25f2bb1b6176bb4ccb9002b6d48751cdf7..a7003e84f19e57d2a4779fd385f70cd482e5b95a 100644 (file)
@@ -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;