Find last '@' in the user@site string, just in case the username has
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index 87711c2..3e0705a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -819,7 +819,7 @@ static int start_client(int argc, char *argv[])
        }
 
        if (shell_machine) {
-               p = strchr(shell_machine,'@');
+               p = strrchr(shell_machine,'@');
                if (p) {
                        *p = 0;
                        shell_user = shell_machine;