Code Duplication    Length = 5-7 lines in 2 locations

src/wp-admin/includes/class-ftp.php 2 locations

@@ 702-706 (lines=5) @@
699
		$ret=true;
700
		foreach($list as $el) {
701
			if($el["type"]=="d") {
702
				if(!$this->mget($remote."/".$el["name"], $local."/".$el["name"], $continious)) {
703
					$this->PushError("mget", "can't copy folder", "Can't copy remote folder \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
704
					$ret=false;
705
					if(!$continious) break;
706
				}
707
			} else {
708
				if(!$this->get($remote."/".$el["name"], $local."/".$el["name"])) {
709
					$this->PushError("mget", "can't copy file", "Can't copy remote file \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
@@ 707-713 (lines=7) @@
704
					$ret=false;
705
					if(!$continious) break;
706
				}
707
			} else {
708
				if(!$this->get($remote."/".$el["name"], $local."/".$el["name"])) {
709
					$this->PushError("mget", "can't copy file", "Can't copy remote file \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
710
					$ret=false;
711
					if(!$continious) break;
712
				}
713
			}
714
			@chmod($local."/".$el["name"], $el["perms"]);
715
			$t=strtotime($el["date"]);
716
			if($t!==-1 and $t!==false) @touch($local."/".$el["name"], $t);