From f047cbbfbcb9e76df97df31d48e894205be5cb4f Mon Sep 17 00:00:00 2001 From: Atif Date: Mon, 25 Aug 2025 12:58:39 +0600 Subject: [PATCH] fix: mkdir `.\./output_dir/` error on windows --- lua/cmake-tools/config.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/cmake-tools/config.lua b/lua/cmake-tools/config.lua index 6a877ea2..b744893e 100644 --- a/lua/cmake-tools/config.lua +++ b/lua/cmake-tools/config.lua @@ -84,6 +84,11 @@ function Config:update_build_dir(build_dir, no_expand_build_dir) "no_expand_build_dir needs to be a string or function returning string path to the build_directory" ) end + + if require("cmake-tools.osys").iswin32 then + build_dir = build_dir:gsub("/", "\\") + end + local build_path = Path:new(build_dir) if build_path:is_absolute() then self.build_directory = Path:new(build_dir)