From 42d4a64d0cdd26d0bc9f52d1146879ea853051a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 31 Mar 2026 13:59:10 +0000 Subject: [PATCH] fix: preview sysfs empty files Agent-Logs-Url: https://github.com/sxyazi/yazi/sessions/4b798394-4c65-49eb-925d-dab553c65276 Co-authored-by: sxyazi <17523360+sxyazi@users.noreply.github.com> --- yazi-plugin/preset/plugins/empty.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yazi-plugin/preset/plugins/empty.lua b/yazi-plugin/preset/plugins/empty.lua index 105b4b62..4ff494d9 100644 --- a/yazi-plugin/preset/plugins/empty.lua +++ b/yazi-plugin/preset/plugins/empty.lua @@ -3,7 +3,7 @@ local M = {} function M.msg(job, s) ya.preview_widget(job, ui.Text(ui.Line(s):reverse()):area(job.area):wrap(ui.Wrap.YES)) end function M:peek(job) - if not job.file.url:starts_with("/proc/") then + if not (job.file.url:starts_with("/proc/") or job.file.url:starts_with("/sys/")) then return self.msg(job, "Empty file") end