Mon, 27 Jul 2009 03:28:05 +0100
Warn when output file not writeable
squish.lua | file | annotate | diff | comparison | revisions |
--- 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