From a19bacc51b938c33aa1d5c75aba6313aa268b0aa Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 24 Jan 2024 09:38:09 +0100 Subject: [PATCH] wait #6652 @0.5 --- src/CommandLine/LFTP.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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'; -- 2.39.5