fix: sub-folder creation on Windows (#1468)

This commit is contained in:
Jie Liu
2025-03-03 15:08:39 +08:00
committed by GitHub
parent de1e6a4212
commit 3fae794ea8

View File

@@ -1320,7 +1320,7 @@ function Sidebar:apply(current_cursor)
for filepath, snippets in pairs(selected_snippets_map) do
if Config.behaviour.minimize_diff then snippets = self:minimize_snippets(filepath, snippets) end
local bufnr = Utils.get_or_create_buffer_with_filepath(filepath)
local path_ = PPath:new(filepath)
local path_ = PPath:new(Utils.is_win() and filepath:gsub("/", "\\") or filepath)
path_:parent():mkdir({ parents = true, exists_ok = true })
insert_conflict_contents(bufnr, snippets)
local function process(winid)