diff options
| author | Andrey Starodubtsev <andrey-starodubtsev@users.noreply.github.com> | 2025-11-12 07:57:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-11 21:57:09 -0800 |
| commit | b15b22fc73bed0629f0a95fdc1aa9f9160ad215c (patch) | |
| tree | f5aff06863a1db0ebcbfc707cc21949ef1279282 /runtime/lua/vim/secure.lua | |
| parent | 653871da1b5507d3391239854982438872ad4032 (diff) | |
| download | rneovim-b15b22fc73bed0629f0a95fdc1aa9f9160ad215c.tar.gz rneovim-b15b22fc73bed0629f0a95fdc1aa9f9160ad215c.tar.bz2 rneovim-b15b22fc73bed0629f0a95fdc1aa9f9160ad215c.zip | |
fix(trust): :trust command on Windows #36509
`:trust` command calculated SHA-256 on file content reading it as a
text. While it doesn't matter on Unices, on Windows hash was calculated
incorectly. SHA-256 for buffer content was calculated fine though.
After this fix hashes in `%LOCALAPPDATA%/nvim-data/trust` are the same
as in output of `sha256sum -t`.
Diffstat (limited to 'runtime/lua/vim/secure.lua')
| -rw-r--r-- | runtime/lua/vim/secure.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/secure.lua b/runtime/lua/vim/secure.lua index e5d567ba0c..a2884f84dc 100644 --- a/runtime/lua/vim/secure.lua +++ b/runtime/lua/vim/secure.lua @@ -47,7 +47,7 @@ local function compute_hash(fullpath, bufnr) end else do - local f = io.open(fullpath, 'r') + local f = io.open(fullpath, 'rb') if not f then return nil, nil end |