Re: [PATCH] Normalise directory names when pushing to some WebDAV servers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tay Ray Chuan wrote:

> --- a/http-push.c
> +++ b/http-push.c
> @@ -1086,10 +1086,15 @@ static void process_ls_ref(struct remote_ls_ctx *ls)
>  static void handle_remote_ls_ctx(struct xml_ctx *ctx, int tag_closed)
>  {
>         struct remote_ls_ctx *ls = (struct remote_ls_ctx *)ctx->userData;
> +       struct strbuf buf = STRBUF_INIT;
> 
>         if (tag_closed) {
>                 if (!strcmp(ctx->name, DAV_PROPFIND_RESP) && ls->dentry_name) {
>                         if (ls->dentry_flags & IS_DIR) {
> +                               end_url_with_slash(&buf, ls->dentry_name);
> +                               free(ls->dentry_name);
> +                               ls->dentry_name = strbuf_detach(&buf, NULL);
> +
>                                 if (ls->flags & PROCESS_DIRS) {

Nit: might make sense to narrow the scope of buf, to avoid tempting
people to reuse or release it.

Thanks,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]