mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
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>
This commit is contained in:
parent
e3730efcfc
commit
42d4a64d0c
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue