Code Duplication    Length = 7-7 lines in 2 locations

lib/private/Files/Storage/Wrapper/Encryption.php 1 location

@@ 768-774 (lines=7) @@
765
		if ($sourceStorage->is_dir($sourceInternalPath)) {
766
			$dh = $sourceStorage->opendir($sourceInternalPath);
767
			$result = $this->mkdir($targetInternalPath);
768
			if (\is_resource($dh)) {
769
				while ($result and ($file = \readdir($dh)) !== false) {
770
					if (!Filesystem::isIgnoredDir($file)) {
771
						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file, false, $isRename);
772
					}
773
				}
774
			}
775
		} else {
776
			try {
777
				$source = $sourceStorage->fopen($sourceInternalPath, 'r');

lib/private/Files/Storage/Common.php 1 location

@@ 565-571 (lines=7) @@
562
		if ($sourceStorage->is_dir($sourceInternalPath)) {
563
			$dh = $sourceStorage->opendir($sourceInternalPath);
564
			$result = $this->mkdir($targetInternalPath);
565
			if (\is_resource($dh)) {
566
				while ($result and ($file = \readdir($dh)) !== false) {
567
					if (!Filesystem::isIgnoredDir($file) && !Filesystem::isForbiddenFileOrDir($file)) {
568
						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file);
569
					}
570
				}
571
			}
572
		} else {
573
			$source = $sourceStorage->fopen($sourceInternalPath, 'r');
574
			// TODO: call fopen in a way that we execute again all storage wrappers