Code Duplication    Length = 5-7 lines in 2 locations

php/elFinderVolumeDriver.class.php 1 location

@@ 563-569 (lines=7) @@
560
		// set thumbnails path
561
		$path = $this->options['tmbPath'];
562
		if ($path) {
563
			if (!file_exists($path)) {
564
				if (@mkdir($path)) {
565
					chmod($path, $this->options['tmbPathMode']);
566
				} else {
567
					$path = '';
568
				}
569
			} 
570
			
571
			if (is_dir($path) && is_readable($path)) {
572
				$this->tmbPath = $path;

php/elFinderVolumeMySQL.class.php 1 location

@@ 139-143 (lines=5) @@
136
		parent::configure();
137
138
		if (($tmp = $this->options['tmpPath'])) {
139
			if (!file_exists($tmp)) {
140
				if (@mkdir($tmp)) {
141
					@chmod($tmp, $this->options['tmbPathMode']);
142
				}
143
			}
144
			
145
			$this->tmpPath = is_dir($tmp) && is_writable($tmp) ? $tmp : false;
146
		}