@@ 922-933 (lines=12) @@ | ||
919 | ||
920 | try { |
|
921 | $exists = $this->file_exists($path2); |
|
922 | if ($this->shouldEmitHooks()) { |
|
923 | \OC_Hook::emit( |
|
924 | Filesystem::CLASSNAME, |
|
925 | Filesystem::signal_copy, |
|
926 | [ |
|
927 | Filesystem::signal_param_oldpath => $this->getHookPath($path1), |
|
928 | Filesystem::signal_param_newpath => $this->getHookPath($path2), |
|
929 | Filesystem::signal_param_run => &$run |
|
930 | ] |
|
931 | ); |
|
932 | $this->emit_file_hooks_pre($exists, $path2, $run); |
|
933 | } |
|
934 | if ($run) { |
|
935 | $mount1 = $this->getMount($path1); |
|
936 | $mount2 = $this->getMount($path2); |
|
@@ 960-970 (lines=11) @@ | ||
957 | $this->changeLock($path2, ILockingProvider::LOCK_SHARED); |
|
958 | $lockTypePath2 = ILockingProvider::LOCK_SHARED; |
|
959 | ||
960 | if ($result !== false && $this->shouldEmitHooks()) { |
|
961 | \OC_Hook::emit( |
|
962 | Filesystem::CLASSNAME, |
|
963 | Filesystem::signal_post_copy, |
|
964 | [ |
|
965 | Filesystem::signal_param_oldpath => $this->getHookPath($path1), |
|
966 | Filesystem::signal_param_newpath => $this->getHookPath($path2) |
|
967 | ] |
|
968 | ); |
|
969 | $this->emit_file_hooks_post($exists, $path2); |
|
970 | } |
|
971 | } |
|
972 | } catch (\Exception $e) { |
|
973 | $this->unlockFile($path2, $lockTypePath2); |