mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-12 10:53:23 +03:00
Ticket #1605: Incorrect parsing FTP-string
ENTRY "example.net" URL "/#ftp:examplenet:5wDJP1B/y@example.net" When I try connect to it I saw: "ftpfs: making connection to examplenet" off course this is failed by timeout. Fix issue: Now search for '@' sign. If present - search for slash at found position If not present - search at start of string. Also fixed parce '@' sign into password area of URI. Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
3c49c19ac0
commit
cf8ae36637
@ -279,7 +279,7 @@ struct vfs_class *
|
||||
vfs_split (char *path, char **inpath, char **op)
|
||||
{
|
||||
char *semi;
|
||||
char *slash;
|
||||
char *slash, *at_chr;
|
||||
struct vfs_class *ret;
|
||||
|
||||
if (!path)
|
||||
@ -289,7 +289,12 @@ vfs_split (char *path, char **inpath, char **op)
|
||||
if (!semi || !path_magic(path))
|
||||
return NULL;
|
||||
|
||||
slash = strchr (semi, PATH_SEP);
|
||||
at_chr = strrchr (semi, '@');
|
||||
if (at_chr)
|
||||
slash = strchr (at_chr, PATH_SEP);
|
||||
else
|
||||
slash = strchr (semi, PATH_SEP);
|
||||
|
||||
*semi = 0;
|
||||
|
||||
if (op)
|
||||
|
Loading…
x
Reference in New Issue
Block a user