	protected function copy($src, $dst, $name) {
		$srcStat = $this->stat($src);
		$this->clearcache();
		
		if (!empty($srcStat['thash'])) {
			$target = $this->decode($srcStat['thash']);
			if (!$this->inpathCE($target, $this->root)) {
				return $this->setError(elFinder::ERROR_COPY, $this->path($srcStat['hash']), elFinder::ERROR_MKOUTLINK);
			}
			$stat   = $this->stat($target);
			$this->clearcache();
			return $stat && $this->symlinkCE($target, $dst, $name)
				? $this->joinPathCE($dst, $name)
				: $this->setError(elFinder::ERROR_COPY, $this->path($srcStat['hash']));
		} 
		
		if ($srcStat['mime'] == 'directory') {
			$test = $this->stat($this->joinPathCE($dst, $name));
			$this->clearcache();
			
			if (($test && $test['mime'] != 'directory') || (! $test = $this->mkdir($this->encode($dst), $name))) {
				return $this->setError(elFinder::ERROR_COPY, $this->path($srcStat['hash']));
			}
			
			$dst = $this->decode($test['hash']);
			
			foreach ($this->getScandir($src) as $stat) {
				if (empty($stat['hidden'])) {
					$name = $stat['name'];
					$_src = $this->decode($stat['hash']);
					if (! $this->copy($_src, $dst, $name)) {
						$this->remove($dst, true); // fall back
						return $this->setError($this->error, elFinder::ERROR_COPY, $this->_path($src));
					}
				}
			}
			$this->clearcache();
			return $dst;
		}

		if ($res = $this->convEncOut($this->_copy($this->convEncIn($src), $this->convEncIn($dst), $this->convEncIn($name)))) {
			return is_string($res)? $res : $this->joinPathCE($dst, $name);
		}

		return $this->setError(elFinder::ERROR_COPY, $this->path($srcStat['hash']));
	}
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.