From aeeef63c3e197d824ee749cd2e65a611529be6b4 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 1 Oct 2014 15:08:39 +0100 Subject: trivial: Do not write an icon tarball if it would be empty --- libappstream-builder/asb-utils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libappstream-builder/asb-utils.c') diff --git a/libappstream-builder/asb-utils.c b/libappstream-builder/asb-utils.c index 88e2dea..0e4a89a 100644 --- a/libappstream-builder/asb-utils.c +++ b/libappstream-builder/asb-utils.c @@ -461,6 +461,8 @@ asb_utils_write_archive_dir (const gchar *filename, files = g_ptr_array_new_with_free_func (g_free); if (!asb_utils_add_files_recursive (files, directory, directory, error)) return FALSE; + if (files->len == 0) + return TRUE; /* write tar file */ return asb_utils_write_archive (filename, directory, files, error); -- cgit v1.2.1