diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-08-31 00:15:07 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-08-31 00:15:07 -0700 |
commit | 144b7757afa466411ff86f55efc45d960e1af154 (patch) | |
tree | 16f4deaa5e18ed2fcd8e25caeab1888cad20158f | |
parent | 2dc1e690f08091851c79f7aba709ecd4603a7eef (diff) | |
parent | 502129809057bb2d06453b88ec368bee964556e7 (diff) | |
download | view.love-144b7757afa466411ff86f55efc45d960e1af154.tar.gz |
Merge text.love
-rw-r--r-- | file.lua | 2 | ||||
-rw-r--r-- | source_file.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/file.lua b/file.lua index d7fcc4e..f7f832b 100644 --- a/file.lua +++ b/file.lua @@ -33,7 +33,7 @@ end function save_to_disk(State) local outfile = App.open_for_writing(State.filename) - if outfile == nil then + if not outfile then error('failed to write to "'..State.filename..'"') end for _,line in ipairs(State.lines) do diff --git a/source_file.lua b/source_file.lua index b0e26eb..dbb6f95 100644 --- a/source_file.lua +++ b/source_file.lua @@ -45,7 +45,7 @@ end function save_to_disk(State) local outfile = App.open_for_writing(App.save_dir..State.filename) - if outfile == nil then + if not outfile then error('failed to write to "'..State.filename..'"') end for _,line in ipairs(State.lines) do |