diff options
author | Solderpunk <solderpunk@sdf.org> | 2018-12-13 16:08:03 +0000 |
---|---|---|
committer | Solderpunk <solderpunk@sdf.org> | 2018-12-13 16:08:03 +0000 |
commit | 37dd6481c45de41bda8b3845c45874886f6ff3d3 (patch) | |
tree | 7093972d0a8b8e9294bc3385e2a86a15ce4aed1b /telem.lua | |
parent | Small bug from bad merge job. (diff) |
Delete tmp files which are no longer needed.
Diffstat (limited to 'telem.lua')
-rwxr-xr-x | telem.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -298,7 +298,10 @@ function create_post() os.execute(_EDITOR .. " " .. filename) -- Check that file exists and is not empty if not path.exists(filename) then return nil end - if lfs.attributes(filename).size == 0 then return nil end + if lfs.attributes(filename).size == 0 then + file.delete(filename) + return nil + end -- Get confirmation from user print("PREVIEW:") print(string.rep("-",79)) @@ -314,6 +317,7 @@ function create_post() if c == "e" then goto edit elseif c == "n" then + file.delete(filename) return nil else return filename |