actually handle append file modes

This commit is contained in:
Izaya 2023-06-07 00:12:15 +10:00
parent 1ef6d5db96
commit ddc2445104

View File

@ -54,7 +54,7 @@ function fs.open(path,mode) -- string string -- table -- Opens file *path* with
if mode:find("r") then if mode:find("r") then
fobj.read = fread fobj.read = fread
end end
if mode:find("w") then if mode:find("w") or mode:find("a") then
fobj.write = fwrite fobj.write = fwrite
end end
return fobj return fobj