From: soufiane Date: Thu, 1 Feb 2024 15:47:11 +0000 (+0100) Subject: wait #6668 @0:05 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a8d769659f16f9da2ba02407db77315f8bd7a2e9;p=cubist_util.git wait #6668 @0:05 --- diff --git a/src/CommandLine/LFTP.php b/src/CommandLine/LFTP.php index c87e242..2ed5b84 100644 --- a/src/CommandLine/LFTP.php +++ b/src/CommandLine/LFTP.php @@ -60,9 +60,11 @@ class LFTP extends CloneUserpassProgram $filename = explode('/',$this->getSrc()); $filename = end($filename); $commands = array_merge($commands, [ - 'put ' . $this->getSrc(), - 'rm ' . $filename + 'put ' . $this->getSrc() ]); + if ($this->isDryRun()) { + throw new \Exception("dry-run flag is incompatible for sending files"); + } } $this->setArg('c', 'open ftp://'.$this->getUsername().':'.$this->getPassword().'@'.$this->getHost().':'.$this->getPort().' '.implode(';', $commands));