Clone in a terminal:
Commit bfe3202
Johan Mattsson - 2013-09-11T11:06:32+00:00
bfe3202cebe1e756f02388c3a66049b0a41c25c6johan.mattsson.m@gmail.com

Export on windows Matthew W. Nuttall did the debugging.

Changed files (4)

Diff

diff --git a/README b/READMEindex eb2267e..2efb16c 100644--- a/README+++ b/README@@ -38,7 +38,6 @@ Configure, build and install with doit: doit
 sudo ./install.py
 
-
 ---------------------
 Building Mac binaries
 ---------------------
diff --git a/libbirdfont/BirdFont.vala b/libbirdfont/BirdFont.valaindex 13a15c0..5f67d06 100644--- a/libbirdfont/BirdFont.vala+++ b/libbirdfont/BirdFont.vala@@ -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;diff --git a/libbirdfont/ExportTool.vala b/libbirdfont/ExportTool.valaindex 060818c..2855a8f 100644--- a/libbirdfont/ExportTool.vala+++ b/libbirdfont/ExportTool.vala@@ -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"); diff --git a/libbirdfont/Font.vala b/libbirdfont/Font.valaindex 7d2be8b..4657c8d 100644--- a/libbirdfont/Font.vala+++ b/libbirdfont/Font.vala@@ -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; 	} 	

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112