Skip to content

Commit

Permalink
fix(base): don't overwrite file with touch
Browse files Browse the repository at this point in the history
  • Loading branch information
pysan3 committed Mar 31, 2024
1 parent 13c11b6 commit 7bba29c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/pathlib/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ end
---@param recursive boolean # if true, creates parent directories as well
---@return boolean|nil success
function Path:touch(mode, recursive)
local fd = self:fs_open("w", mode, recursive)
local fd = self:fs_open("a", mode, recursive)
if fd ~= nil then
self.nuv.fs_close(fd)
return true
Expand Down

0 comments on commit 7bba29c

Please sign in to comment.