[aisleriot] cards: svgcrush: Keep files that pngcrush chokes on
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] cards: svgcrush: Keep files that pngcrush chokes on
- Date: Wed, 7 Dec 2011 23:13:38 +0000 (UTC)
commit 383829da4693e08e050daa8e93d936a0f3bf8f20
Author: Christian Persch <chpe gnome org>
Date: Thu Dec 8 00:13:18 2011 +0100
cards: svgcrush: Keep files that pngcrush chokes on
Allows to examine them.
cards/svgcrush.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/cards/svgcrush.c b/cards/svgcrush.c
index a5a4351..fe41009 100644
--- a/cards/svgcrush.c
+++ b/cards/svgcrush.c
@@ -150,7 +150,11 @@ crush (const char *tmp_in,
/* pngcrush sometimes exits with status 0 but writes a zero-length file */
if (*len == 0) {
g_free (contents);
- contents = NULL;
+ unlink (tmp_out);
+ link (tmp_in, tmp_out);
+ g_printerr ("pngcrush choked on file %s\n", tmp_out);
+ g_free (tmp_out);
+ return NULL;
}
out:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]