The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix compile warning

These changes was commited to the Birdfont repository Sun, 27 Sep 2015 17:42:58 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 27 Sep 2015 17:42:58 +0000 (19:42 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 27 Sep 2015 17:43:22 +0000 (19:43 +0200)
commit c50124cb6534cc967cee3557956d30ed6be2ae36
tree b25d6b32cfddd3e5b52a2b6cefb90a2c65600da6
parent c5ce19445ceac8a5ade778e262d71b3bcecee587
Fix compile warning

birdfont-autotrace/AutoTrace.vala
--- a/birdfont-autotrace/AutoTrace.vala +++ b/birdfont-autotrace/AutoTrace.vala @@ -149,12 +149,17 @@ file = File.new_for_path (file_name); - if (file.query_exists ()) { - file.delete (); + try { + if (file.query_exists ()) { + file.delete (); + } + + data_stream = new DataOutputStream (file.create (FileCreateFlags.REPLACE_DESTINATION)); + data_stream.put_string (svg); + } catch (GLib.Error e) { + warning(e.message); + return 1; } - - data_stream = new DataOutputStream (file.create (FileCreateFlags.REPLACE_DESTINATION)); - data_stream.put_string (svg); } return 0;