dav/main.c

changeset 726
8f6ad495f538
parent 723
5ca174b3247a
child 728
35a421f441d5
equal deleted inserted replaced
725:de3b2bb46492 726:8f6ad495f538
3370 UcxBuffer *out = ucx_buffer_new(NULL, 512, UCX_BUFFER_AUTOEXTEND); 3370 UcxBuffer *out = ucx_buffer_new(NULL, 512, UCX_BUFFER_AUTOEXTEND);
3371 ucx_buffer_puts(out, repo->name); 3371 ucx_buffer_puts(out, repo->name);
3372 if(space) { 3372 if(space) {
3373 size_t l = strlen(elm->path); 3373 size_t l = strlen(elm->path);
3374 for(int i=0;i<l;i++) { 3374 for(int i=0;i<l;i++) {
3375 // only if we do not quote, we have to escape spaces 3375 // only if we do not quote, we have to escape
3376 if(elm->path[i] == ' ' && quote == '\0') { 3376 char nextc = elm->path[i];
3377 ucx_buffer_puts(out, "\\ "); 3377 if(quote == '\0' && NULL != strchr(
3378 } else { 3378 "!\"#$&'()*,;<>?[\\]^`{|}~ ", nextc)) {
3379 ucx_buffer_putc(out, elm->path[i]); 3379 ucx_buffer_putc(out, '\\');
3380 } 3380 }
3381 ucx_buffer_putc(out, nextc);
3381 } 3382 }
3382 } else { 3383 } else {
3383 ucx_buffer_puts(out, elm->path); 3384 ucx_buffer_puts(out, elm->path);
3384 } 3385 }
3385 if(elm->iscollection) { 3386 if(elm->iscollection) {

mercurial