Code Duplication    Length = 3-3 lines in 2 locations

lib/elFinderVolumeFTP.class.php 1 location

@@ 1366-1368 (lines=3) @@
1363
			// create unique name for directory
1364
			$src = $dir;
1365
	        $name = basename($path);
1366
	        if (preg_match('/\.((tar\.(gz|bz|bz2|z|lzo))|cpio\.gz|ps\.gz|xcf\.(gz|bz2)|[a-z0-9]{1,4})$/i', $name, $m)) {
1367
	            $name = substr($name, 0, strlen($name) - strlen($m[0]));
1368
	        }
1369
	        $test = $this->_joinPath(dirname($path), $name);
1370
	        if ($this->stat($test)) {
1371
	            $name = $this->uniqueName(dirname($path), $name, '-', false);

lib/elFinderVolumeLocalFileSystem.class.php 1 location

@@ 1152-1154 (lines=3) @@
1149
				// create unique name for directory
1150
				$src = $dir;
1151
	            $name = basename($path);
1152
	            if (preg_match('/\.((tar\.(gz|bz|bz2|z|lzo))|cpio\.gz|ps\.gz|xcf\.(gz|bz2)|[a-z0-9]{1,4})$/i', $name, $m)) {
1153
	                $name = substr($name, 0, strlen($name) - strlen($m[0]));
1154
	            }
1155
	            $test = dirname($path).DIRECTORY_SEPARATOR.$name;
1156
	            if (file_exists($test) || is_link($test)) {
1157
	                $name = $this->uniqueName(dirname($path), $name, '-', false);