Code Duplication    Length = 7-7 lines in 2 locations

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

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

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

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