Skip to content

Commit

Permalink
lua: reap the zombie after io.popen()
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperVector authored and martanne committed Jan 26, 2018
1 parent 5879337 commit 45f5446
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/plugins/filetype.lua
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win)
local file = io.popen(string.format("file -bL --mime-type -- '%s'", name:gsub("'", "'\\''")))
if file then
local mime = file:read('*all')
file:close()
if mime then
mime = mime:gsub('%s*$', '')
end
Expand Down

0 comments on commit 45f5446

Please sign in to comment.