squish.lua

changeset 32
d78440c40faa
parent 31
84b653f78e5f
child 34
0e34461ab2a6
--- a/squish.lua	Mon Jul 27 03:27:32 2009 +0100
+++ b/squish.lua	Mon Jul 27 03:28:05 2009 +0100
@@ -145,7 +145,11 @@
 end
 
 print_info("Writing "..out_fn.."...");
-local f = io.open(out_fn, "w+");
+local f, err = io.open(out_fn, "w+");
+if not f then
+	print_err("Couldn't open output file: "..tostring(err));
+	os.exit(1);
+end
 
 if opts.executable then
 	if opts.executable == true then

mercurial