summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2010-07-11 20:42:06 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2010-07-11 20:42:06 +0000
commitd4c519cc05536486c202a399826633b1b025c22a (patch)
treeb02cd9e1c5a29cf9a69ad9ac3407fea0727eae02 /render
parent1c48e85ce9b7c82cb6b5e5d3bee88ad77d001c1c (diff)
downloadnetsurf-d4c519cc05536486c202a399826633b1b025c22a.tar.gz
netsurf-d4c519cc05536486c202a399826633b1b025c22a.tar.bz2
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
Diffstat (limited to 'render')
-rw-r--r--render/directory.c4
1 files changed, 3 insertions, 1 deletions
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),
- "<a href=\"..\">[..]</a>\n");
+ "<a href=\"%s\">[..]</a>\n", up);
binding_parse_chunk(c->data.html.parser_binding,
(uint8_t *) buffer, strlen(buffer));