Code Duplication    Length = 3-3 lines in 2 locations

php/elFinderVolumeFTP.class.php 1 location

@@ 1170-1172 (lines=3) @@
1167
			// create unique name for directory
1168
			$src = $dir;
1169
			$name = basename($path);
1170
			if (preg_match('/\.((tar\.(gz|bz|bz2|z|lzo))|cpio\.gz|ps\.gz|xcf\.(gz|bz2)|[a-z0-9]{1,4})$/i', $name, $m)) {
1171
				$name = substr($name, 0,  strlen($name)-strlen($m[0]));
1172
			}
1173
			$test = $this->_joinPath(dirname($path), $name);
1174
			if ($this->stat($test)) {
1175
				$name = $this->uniqueName(dirname($path), $name, '-', false);

php/elFinderVolumeLocalFileSystem.class.php 1 location

@@ 924-926 (lines=3) @@
921
				// create unique name for directory
922
				$src = $dir;
923
				$name = basename($path);
924
				if (preg_match('/\.((tar\.(gz|bz|bz2|z|lzo))|cpio\.gz|ps\.gz|xcf\.(gz|bz2)|[a-z0-9]{1,4})$/i', $name, $m)) {
925
					$name = substr($name, 0,  strlen($name)-strlen($m[0]));
926
				}
927
				$test = dirname($path).DIRECTORY_SEPARATOR.$name;
928
				if (file_exists($test) || is_link($test)) {
929
					$name = $this->uniqueName(dirname($path), $name, '-', false);