nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f4ff4b07937c7c568474e352f6a7b0af340e7a32
parent a58c65a51ab3e954692d830a9366908becd27e50
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Wed, 22 Jul 2020 17:00:45 +0530

Fix #684: support path appended to hostname

Diffstat:
Msrc/nnn.c | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -4027,8 +4027,15 @@ static bool remote_mount(char *newpath) /* Convert "Host" to "Host:" */ size_t len = xstrlen(tmp); + bool path = FALSE; - if (tmp[len - 1] != ':') { /* Append ':' if missing */ + for (size_t count = 0; count < len; ++count) + if (tmp[count] == ':') { + path = TRUE; + break; + } + + if (!path) { /* Append ':' if missing */ tmp[len] = ':'; tmp[len + 1] = '\0'; }