# HG changeset patch # User Matthew Wild # Date 1248661685 -3600 # Node ID d78440c40faa8fc898c7ce2ad80058c626e3e404 # Parent 84b653f78e5f9bb7a0b6971afbdcd0edaa99504b Warn when output file not writeable diff -r 84b653f78e5f -r d78440c40faa squish.lua --- 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