Skip to content

Commit

Permalink
lcpz#25 blueluke's fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
luke bonham authored and copycat-killer committed Aug 5, 2015
1 parent 9cd85a2 commit 0dfbb46
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Licensed under GNU General Public License v2
* (c) 2013, Luke Bonham
* (c) 2010-2012, Peter Hofmann
--]]

Expand Down Expand Up @@ -33,10 +32,14 @@ end

-- {{{ File operations

-- see if the file exists
-- see if the file exists and is readable
function helpers.file_exists(file)
local f = io.open(file)
if f then f:close() end
if f then
local s = f:read()
f:close()
f = s
end
return f ~= nil
end

Expand Down

0 comments on commit 0dfbb46

Please sign in to comment.