Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix fs.open to support fs.open(path, flags nil, callback)
  • Loading branch information
hnakamur committed Aug 15, 2012
1 parent dea94c3 commit b1842d2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/luvit/fs.lua
Expand Up @@ -103,10 +103,9 @@ end
function fs.open(path, flags, mode, callback)
if callback == nil then
callback = mode
mode = 438 --[[=0666]]
else
mode = modeNum(mode)
mode = nil
end
mode = modeNum(mode, 438 --[[=0666]])
native.fsOpen(path, flags, mode, callback or default)
end
Expand Down

0 comments on commit b1842d2

Please sign in to comment.