Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 734-740 (lines=7) @@
731
		if ($sourceStorage->is_dir($sourceInternalPath)) {
732
			$dh = $sourceStorage->opendir($sourceInternalPath);
733
			$result = $this->mkdir($targetInternalPath);
734
			if (is_resource($dh)) {
735
				while ($result and ($file = readdir($dh)) !== false) {
736
					if (!Filesystem::isIgnoredDir($file)) {
737
						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file, false, $isRename);
738
					}
739
				}
740
			}
741
		} else {
742
			try {
743
				$source = $sourceStorage->fopen($sourceInternalPath, 'r');

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

@@ 595-601 (lines=7) @@
592
		if ($sourceStorage->is_dir($sourceInternalPath)) {
593
			$dh = $sourceStorage->opendir($sourceInternalPath);
594
			$result = $this->mkdir($targetInternalPath);
595
			if (is_resource($dh)) {
596
				while ($result and ($file = readdir($dh)) !== false) {
597
					if (!Filesystem::isIgnoredDir($file)) {
598
						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file);
599
					}
600
				}
601
			}
602
		} else {
603
			$source = $sourceStorage->fopen($sourceInternalPath, 'r');
604
			// TODO: call fopen in a way that we execute again all storage wrappers