libidav/utils.c

changeset 544
9e85e1ec1155
parent 543
2f85df8cd35e
child 545
268157722a0e
equal deleted inserted replaced
543:2f85df8cd35e 544:9e85e1ec1155
861 ucx_buffer_putc(buf, 0); 861 ucx_buffer_putc(buf, 0);
862 char *str = buf->space; 862 char *str = buf->space;
863 ucx_buffer_free(buf); 863 ucx_buffer_free(buf);
864 return str; 864 return str;
865 } 865 }
866
867 void util_remove_trailing_pathseparator(char *path) {
868 size_t len = strlen(path);
869 if(len < 2) {
870 return;
871 }
872
873 if(path[len-1] == '/') {
874 path[len-1] = '\0';
875 }
876 }

mercurial