mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-22 15:21:04 +00:00
fix: correctly handle CRLF on Windows in preset archive and json plugins (#2017)
This commit is contained in:
parent
a743488476
commit
7498b97251
2 changed files with 2 additions and 7 deletions
|
|
@ -110,7 +110,7 @@ function M.list_files(args, skip, limit)
|
|||
goto continue
|
||||
end
|
||||
|
||||
key, value = next:match("^(%u%l+) = (.+)[\r\n]+")
|
||||
key, value = next:match("^(%u%l+) = (.-)[\r\n]+")
|
||||
if key == "Path" then
|
||||
files[#files].path = value
|
||||
elseif key == "Size" then
|
||||
|
|
|
|||
|
|
@ -2,12 +2,7 @@ local M = {}
|
|||
|
||||
function M:peek(job)
|
||||
local child = Command("jq")
|
||||
:args({
|
||||
"-C",
|
||||
"--tab",
|
||||
".",
|
||||
tostring(job.file.url),
|
||||
})
|
||||
:args({ "-b", "-C", "--tab", ".", tostring(job.file.url) })
|
||||
:stdout(Command.PIPED)
|
||||
:stderr(Command.PIPED)
|
||||
:spawn()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue