Code Duplication    Length = 11-12 lines in 2 locations

lib/private/Files/View.php 2 locations

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