diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-08-30 23:52:25 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-08-30 23:52:25 -0700 |
commit | 6e54ad55d98ff041db15a1a1157e493d76776dfc (patch) | |
tree | 55385ca9c1a4e5a872d450ce62eb879b31340099 /file.lua | |
parent | 06ad5c4e8ce1c4a78db7eb11b680758fab68cc69 (diff) | |
download | text.love-6e54ad55d98ff041db15a1a1157e493d76776dfc.tar.gz |
yet another set of bugfixes
The key API change I'd underestimated: opening a file used to return nil on failure, and now returns false.
Diffstat (limited to 'file.lua')
-rw-r--r-- | file.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/file.lua b/file.lua index 62b075e..228f1f3 100644 --- a/file.lua +++ b/file.lua @@ -37,7 +37,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 |