Commit bfe3202
Export on windows Matthew W. Nuttall did the debugging.
Changed files (4)
modifiedREADMEmodifiedlibbirdfont/BirdFont.valamodifiedlibbirdfont/ExportTool.valamodifiedlibbirdfont/Font.vala
Diff
@@ -38,7 +38,6 @@ Configure, build and install with doit: doit sudo ./install.py - --------------------- Building Mac binaries --------------------- @@ -104,10 +104,10 @@ public static int run_export (string[] arg) { BirdFont.current_glyph = new Glyph (""); if (!BirdFont.get_current_font ().load (file_name, false)) {- stderr.printf (@"Failed to load font $file_name.\n");+ warning (@"Failed to load font $file_name.\n"); if (!file_name.has_suffix (".bf")) {- stderr.printf (@"Is it a .bf file?\n");+ warning (@"Is it a .bf file?\n"); } return 1;@@ -470,7 +470,13 @@ os.put_string ( try { // create a copy of current font and use it in a separate // export thread- temp_file = current_font.save_backup ();+ + if (async) {+ temp_file = current_font.save_backup ();+ } else {+ temp_file = current_font.get_path (); + }+ ttf_file = folder.get_child (current_font.get_full_name () + ".ttf"); eot_file = folder.get_child (current_font.get_full_name () + ".eot"); @@ -487,8 +487,13 @@ public class Font : GLib.Object { temp_file = dir.get_child (@"$(name).bf"); backup_file = (!) ((!) temp_file).get_path (); backup_file = backup_file.replace (" ", "_");- birdfont_file.write_font_file (backup_file, true); + if (get_path () == backup_file) {+ warning ("Refusing to write backup of a backup.");+ return backup_file;+ }+ + birdfont_file.write_font_file (backup_file, true); return backup_file; }