Files
neovim/test/functional/lua
Jeremy Fleischman 272dba7f07 fix(trust): support for trusting directories #33617
Problem:
Directories that are "trusted" by `vim.secure.read()`, are not detectable later
(they will prompt again). https://github.com/neovim/neovim/discussions/33587#discussioncomment-12925887

Solution:
`vim.secure.read()` returns `true` if the user trusts a directory.

Also fix other bugs:

- If `f:read('*a')` returns `nil`, we treat that as a successful read of
  the file, and hash it. `f:read` returns `nil` for directories, but
  it's also documented as returning `nil` "if it cannot read data with the
  specified format". I reworked the implementation so we explicitly
  treat directories differently. Rather than hashing `nil` to put in the
  trust database, we now put "directory" in there explicitly*.
- `vim.secure.trust` (used by `:trust`) didn't actually work for
  directories, as it would blindly read the contents of a netrw buffer
  and hash it. Now it uses the same codepath as `vim.secure.read`, and
  as a result, works correctly for directories.
2025-04-30 04:20:39 -07:00
..
2024-04-23 18:17:04 +02:00
2025-01-09 09:26:45 -08:00
2025-01-01 12:29:51 -08:00
2025-03-14 09:09:16 +00:00
2024-04-23 18:17:04 +02:00
2025-02-26 23:06:22 +01:00
2025-03-02 14:27:52 -08:00