fix /bin/touch

This commit is contained in:
payonel 2016-07-24 21:37:40 -07:00
parent 367f268662
commit aa422bf21a

View File

@ -31,7 +31,7 @@ for _,arg in ipairs(args) do
if fs.isDirectory(path) then
io.stderr:write(string.format("`%s' ignored: directories not supported\n", arg))
elseif fs.exists(path) or not options.c then
local f, reason = io.open(path, "w")
local f, reason = io.open(path, "a")
if not f then
io.stderr:write(string.format("touch: cannot touch `%s': permission denied\n", arg))
errors = 1