Code Duplication    Length = 10-12 lines in 2 locations

lib/elFinderVolumeFTP.class.php 2 locations

@@ 1389-1400 (lines=12) @@
1386
            if (is_dir($src) && $name) {
1387
                $target = $this->_joinPath($dstDir, $name);
1388
                $_stat = $this->_stat($target);
1389
                if ($_stat) {
1390
                    if (! $this->options['copyJoin']) {
1391
                        if ($_stat['mime'] === 'directory') {
1392
                            $this->delTree($target);
1393
                        } else {
1394
                            $this->_unlink($target);
1395
                        }
1396
                        $_stat = false;
1397
                    } else {
1398
                        $dstDir = $target;
1399
                    }
1400
                }
1401
                if (! $_stat && (! $dstDir = $this->_mkdir($dstDir, $name))) {
1402
                    $this->rmdirRecursive($dir);
1403
@@ 1419-1428 (lines=10) @@
1416
                    $name = basename($name);
1417
                    $target = $this->_joinPath($this->_joinPath($dstDir, $p), $name);
1418
                    $_stat = $this->_stat($target);
1419
                    if ($_stat) {
1420
                        if (! $this->options['copyJoin']) {
1421
                            if ($_stat['mime'] === 'directory') {
1422
                                $this->delTree($target);
1423
                            } else {
1424
                                $this->_unlink($target);
1425
                            }
1426
                            $_stat = false;
1427
                        }
1428
                    }
1429
                    if (! $_stat && (! $target = $this->_mkdir($this->_joinPath($dstDir, $p), $name))) {
1430
                        $this->rmdirRecursive($dir);
1431