From a8d769659f16f9da2ba02407db77315f8bd7a2e9 Mon Sep 17 00:00:00 2001 From: soufiane Date: Thu, 1 Feb 2024 16:47:11 +0100 Subject: [PATCH] wait #6668 @0:05 --- src/CommandLine/LFTP.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)); -- 2.39.5