From 7bba29c8952df04ad1f208d209af5e84e31f0a33 Mon Sep 17 00:00:00 2001 From: pysan3 Date: Sun, 31 Mar 2024 16:51:07 +0900 Subject: [PATCH] fix(base): don't overwrite file with touch --- lua/pathlib/base.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pathlib/base.lua b/lua/pathlib/base.lua index ef152eb..1b2533c 100644 --- a/lua/pathlib/base.lua +++ b/lua/pathlib/base.lua @@ -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