mirror of
https://github.com/neovim/neovim.git
synced 2026-05-24 05:40:08 +00:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user