diff --git a/lib/vfs/path.c b/lib/vfs/path.c index e070512ef..bd37e3ca4 100644 --- a/lib/vfs/path.c +++ b/lib/vfs/path.c @@ -193,7 +193,11 @@ vfs_path_build_url_params_str (vfs_path_element_t * element) { if ((element->user != NULL) || (element->password != NULL)) g_string_append_c (buffer, '@'); + if (element->ipv6) + g_string_append_c (buffer, '['); g_string_append (buffer, element->host); + if (element->ipv6) + g_string_append_c (buffer, ']'); } if ((element->port) != 0 && (element->host != NULL)) @@ -314,6 +318,7 @@ vfs_path_url_split (vfs_path_element_t * path_element, const char *path) colon[0] = '\0'; colon[1] = '\0'; colon++; + path_element->ipv6 = TRUE; } } diff --git a/lib/vfs/path.h b/lib/vfs/path.h index 384a87d9c..6f54dfb21 100644 --- a/lib/vfs/path.h +++ b/lib/vfs/path.h @@ -29,6 +29,7 @@ typedef struct char *user; char *password; char *host; + gboolean ipv6; int port; char *path; struct vfs_class *class;