Thu, 28 Jun 2018 17:58:37 +0200
fixes url completion output
dav/main.c | file | annotate | diff | comparison | revisions |
--- 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);