From: Vincent Vanwaelscappel Date: Wed, 24 Jan 2024 08:38:09 +0000 (+0100) Subject: wait #6652 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a19bacc51b938c33aa1d5c75aba6313aa268b0aa;p=cubist_util.git wait #6652 @0.5 --- diff --git a/src/CommandLine/LFTP.php b/src/CommandLine/LFTP.php index 94ab35d..e37254a 100644 --- a/src/CommandLine/LFTP.php +++ b/src/CommandLine/LFTP.php @@ -41,11 +41,13 @@ class LFTP extends CloneUserpassProgram break; } - $commands = array_merge($commands, [ - 'mkdir -p ' . $this->getFinalDest(), - 'cd ' . $this->getFinalDest(), - 'lcd ' . $this->getSrc(), - ]); + $dest = $this->getFinalDest(); + if ($dest) { + $commands[] = 'mkdir -p ' . $dest; + $commands[] = 'cd ' . $dest; + } + + $commands[] = 'lcd ' . $this->getSrc(); $mirrorCmd = 'mirror --reverse --verbose --parallel=5'; if ($this->getMirror()) { $mirrorCmd .= ' --delete';