Skip to content

Commit d16856f

Browse files
Use 'user' only if 'host' is configured
1 parent 572f146 commit d16856f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Backup/Sync/Rsync.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@ public function sync(Target $target, Result $result)
148148

149149
// target handling
150150
$syncTarget = '';
151-
// remote user
152-
if (null !== $this->user) {
153-
$syncTarget .= $this->user . '@';
154-
}
155151
// remote host
156152
if (null !== $this->host) {
153+
// remote user
154+
if (null !== $this->user) {
155+
$syncTarget .= $this->user . '@';
156+
}
157157
$syncTarget .= $this->host . ':';
158158
}
159159
// remote path

0 commit comments

Comments
 (0)