From d4c519cc05536486c202a399826633b1b025c22a Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 11 Jul 2010 20:42:06 +0000 Subject: Amiga file: URIs now translate the : in device names to / (and back), which conforms better to the spec (: will still work for compatibility, but may have problems). This fixes a problem with directory browsing. Directory parent link now uses the full parent path returned by url_parent instead of one relative to the current directory. svn path=/trunk/netsurf/; revision=10629 --- render/directory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'render/directory.c') diff --git a/render/directory.c b/render/directory.c index 193941ecf..4cb9c8af4 100644 --- a/render/directory.c +++ b/render/directory.c @@ -100,11 +100,13 @@ bool directory_convert(struct content *c) { (uint8_t *) buffer, strlen(buffer)); res = url_parent(content__get_url(c), &up); + if (res == URL_FUNC_OK) { res = url_compare(content__get_url(c), up, false, &compare); if ((res == URL_FUNC_OK) && !compare) { + if(up[strlen(up) - 1] == '/') up[strlen(up) - 1] = '\0'; snprintf(buffer, sizeof(buffer), - "[..]\n"); + "[..]\n", up); binding_parse_chunk(c->data.html.parser_binding, (uint8_t *) buffer, strlen(buffer)); -- cgit v1.2.3