From d77fdb277094ff22de92e438bb57e6b9c563b23b Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 16 Dec 2019 16:26:33 -0500 Subject: [PATCH] gvfs-helper: move content-type warning for prefetch packs Signed-off-by: Derrick Stolee --- gvfs-helper.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/gvfs-helper.c b/gvfs-helper.c index d1d539fc864351..f1aa2085fe36d6 100644 --- a/gvfs-helper.c +++ b/gvfs-helper.c @@ -2453,25 +2453,25 @@ static void install_result(struct gh__request_params *params, install_prefetch(params, status); return; } - } - - if (!strcmp(status->content_type.buf, "application/x-git-packfile")) { - assert(params->b_is_post); - assert(params->objects_mode == GH__OBJECTS_MODE__POST); + } else { + if (!strcmp(status->content_type.buf, "application/x-git-packfile")) { + assert(params->b_is_post); + assert(params->objects_mode == GH__OBJECTS_MODE__POST); - install_packfile(params, status); - return; - } + install_packfile(params, status); + return; + } - if (!strcmp(status->content_type.buf, - "application/x-git-loose-object")) { - /* - * We get these for "gvfs/objects" GET and POST requests. - * - * Note that this content type is singular, not plural. - */ - install_loose(params, status); - return; + if (!strcmp(status->content_type.buf, + "application/x-git-loose-object")) { + /* + * We get these for "gvfs/objects" GET and POST requests. + * + * Note that this content type is singular, not plural. + */ + install_loose(params, status); + return; + } } strbuf_addf(&status->error_message,