mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
Fix #684: support path appended to hostname
This commit is contained in:
parent
a58c65a51a
commit
f4ff4b0793
|
@ -4027,8 +4027,15 @@ static bool remote_mount(char *newpath)
|
||||||
|
|
||||||
/* Convert "Host" to "Host:" */
|
/* Convert "Host" to "Host:" */
|
||||||
size_t len = xstrlen(tmp);
|
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] = ':';
|
||||||
tmp[len + 1] = '\0';
|
tmp[len + 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue