Code Duplication    Length = 5-5 lines in 2 locations

typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php 2 locations

@@ 772-776 (lines=5) @@
769
        $targetPath = $this->getAbsolutePath($newFileIdentifier);
770
771
        if ($removeOriginal) {
772
            if (is_uploaded_file($localFilePath)) {
773
                $result = move_uploaded_file($localFilePath, $targetPath);
774
            } else {
775
                $result = rename($localFilePath, $targetPath);
776
            }
777
        } else {
778
            $result = copy($localFilePath, $targetPath);
779
        }
@@ 870-874 (lines=5) @@
867
    public function replaceFile($fileIdentifier, $localFilePath)
868
    {
869
        $filePath = $this->getAbsolutePath($fileIdentifier);
870
        if (is_uploaded_file($localFilePath)) {
871
            $result = move_uploaded_file($localFilePath, $filePath);
872
        } else {
873
            $result = rename($localFilePath, $filePath);
874
        }
875
        GeneralUtility::fixPermissions($filePath);
876
        if ($result === false) {
877
            throw new \RuntimeException('Replacing file ' . $fileIdentifier . ' with ' . $localFilePath . ' failed.', 1315314711);