[recipes] Avoid an error during exporting recipes without images
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Avoid an error during exporting recipes without images
- Date: Tue, 17 Jan 2017 03:47:52 +0000 (UTC)
commit 4db38fcc0d8e1d4c7d5a7c37e178894e5b38cc84
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jan 16 22:11:38 2017 -0500
Avoid an error during exporting recipes without images
We were not careful enough when handling empty image paths.
https://bugzilla.gnome.org/show_bug.cgi?id=777306
src/gr-recipe-exporter.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-recipe-exporter.c b/src/gr-recipe-exporter.c
index 474fe7b..a8c9e3a 100644
--- a/src/gr-recipe-exporter.c
+++ b/src/gr-recipe-exporter.c
@@ -279,7 +279,7 @@ export_one_chef (GrRecipeExporter *exporter,
fullname = gr_chef_get_fullname (chef);
description = gr_chef_get_description (chef);
image_path = gr_chef_get_image (chef);
- if (image_path) {
+ if (image_path && image_path[0]) {
g_autoptr(GFile) source = NULL;
g_autoptr(GFile) dest = NULL;
g_autofree char *basename = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]