fix(trust): always use "/" slashes in filepaths #39355

Problem:
We should not use "\" (backslashes) except where absolutely required.
See references in https://github.com/neovim/neovim/pull/37729

Solution:
There is no reason to use "\" slashes in the trust db, so don't.
This commit is contained in:
Justin M. Keyes
2026-04-24 07:37:21 -04:00
committed by GitHub
parent c0e358f7e8
commit 5c88492a13
5 changed files with 29 additions and 39 deletions

View File

@@ -110,6 +110,7 @@ function M.read(path)
if not fullpath then
return nil
end
fullpath = vim.fs.normalize(fullpath) -- Ensure "/" slashes, even on Windows.
local trust = read_trust()
@@ -218,6 +219,7 @@ function M.trust(opts)
if not fullpath then
return false, string.format('invalid path: %s', path)
end
fullpath = vim.fs.normalize(fullpath) -- Ensure "/" slashes, even on Windows.
local trust = read_trust()