diff options
| author | Casper Ti. Vector <CasperVector@gmail.com> | 2018-01-24 11:22:33 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2018-01-26 20:06:53 +0100 |
| commit | 45f5446d2a243811a2b02927e05e3993d09e7361 (patch) | |
| tree | 57c7f2e45e6647157225271352c3e87378cc1734 /lua | |
| parent | 5879337bb6905540a8f0797aa1b084b9cdc1d9fa (diff) | |
| download | vis-45f5446d2a243811a2b02927e05e3993d09e7361.tar.gz vis-45f5446d2a243811a2b02927e05e3993d09e7361.tar.xz | |
lua: reap the zombie after io.popen()
Close #655
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/plugins/filetype.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua index f5c0800..dfbf2b0 100644 --- a/lua/plugins/filetype.lua +++ b/lua/plugins/filetype.lua @@ -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 |
