# HG changeset patch # User Olaf Wintermann # Date 1530201517 -7200 # Node ID 7096666628ca039df3f8ed15f009436346bd7cc5 # Parent a213ecaf3f4a135433056f2dc02dce5dfb846d15 fixes url completion output diff -r a213ecaf3f4a -r 7096666628ca dav/main.c --- a/dav/main.c Thu Jun 28 17:42:49 2018 +0200 +++ b/dav/main.c Thu Jun 28 17:58:37 2018 +0200 @@ -2141,7 +2141,7 @@ filter = sstr(util_resource_name(path)); } - DavResource *ls = dav_query(sn, "select - from %s", lspath); + DavResource *ls = dav_query(sn, "select - from %s order by name", lspath); DavResource *elm = ls->children; while(elm) { sstr_t name = sstr(elm->name); @@ -2169,7 +2169,9 @@ ucx_buffer_puts(out, elm->path); } if(elm->iscollection) { - ucx_buffer_putc(out, '/'); + if(out->space[out->pos-1] != '/') { + ucx_buffer_putc(out, '/'); + } } printf("%.*s\n", (int)out->pos, out->space);