From 7c695126e1da4502c16fbdc4057b5246370da479 Mon Sep 17 00:00:00 2001 From: Tomas Mlcoch Date: Wed, 5 Jun 2013 11:02:20 +0200 Subject: [PATCH] repomd: Suppress warning about unknown compression if NO_COMPRESSION used in fill(). --- src/repomd.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/repomd.c b/src/repomd.c index fe932e0..66c5250 100644 --- a/src/repomd.c +++ b/src/repomd.c @@ -277,12 +277,13 @@ cr_repomd_record_fill(cr_RepomdRecord *md, g_free(open_stat->checksum); g_free(open_stat); } else { - // Unknown compression - g_warning("%s: File \"%s\" compressed by an unsupported type" - " of compression", __func__, path); - md->checksum_open_type = g_string_chunk_insert(md->chunk, "UNKNOWN"); - md->checksum_open = g_string_chunk_insert(md->chunk, - "file_compressed_by_an_unsupported_type_of_compression"); + if (com_type != CR_CW_NO_COMPRESSION) { + // Unknown compression + g_warning("%s: File \"%s\" compressed by an unsupported type" + " of compression", __func__, path); + } + md->checksum_open_type = NULL; + md->checksum_open = NULL; md->size_open = -1; } } -- 2.7.4