]> _ Git - cubist_util.git/commitdiff
wait #6652 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 24 Jan 2024 08:38:09 +0000 (09:38 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 24 Jan 2024 08:38:09 +0000 (09:38 +0100)
src/CommandLine/LFTP.php

index 94ab35df5671b69f25b7150c6efa201b24224ffd..e37254af135948edaa07271051ac67f8042f7b32 100644 (file)
@@ -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';