From b8051b826e6e2731aed1cb4bc6fab86377e450c5 Mon Sep 17 00:00:00 2001 From: Lucas Van Laer Date: Fri, 6 Dec 2024 13:52:43 +0100 Subject: [PATCH] fix: improper file name escaping --- lua/oil/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/oil/util.lua b/lua/oil/util.lua index 441421b9..6dc85a83 100644 --- a/lua/oil/util.lua +++ b/lua/oil/util.lua @@ -21,7 +21,7 @@ end ---@param filename string ---@return string M.escape_filename = function(filename) - local ret = filename:gsub("([%%#$])", "\\%1") + local ret = vim.fn.fnameescape(filename) return ret end