mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +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
|
goto continue
|
||||||
end
|
end
|
||||||
|
|
||||||
key, value = next:match("^(%u%l+) = (.+)[\r\n]+")
|
key, value = next:match("^(%u%l+) = (.-)[\r\n]+")
|
||||||
if key == "Path" then
|
if key == "Path" then
|
||||||
files[#files].path = value
|
files[#files].path = value
|
||||||
elseif key == "Size" then
|
elseif key == "Size" then
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,7 @@ local M = {}
|
||||||
|
|
||||||
function M:peek(job)
|
function M:peek(job)
|
||||||
local child = Command("jq")
|
local child = Command("jq")
|
||||||
:args({
|
:args({ "-b", "-C", "--tab", ".", tostring(job.file.url) })
|
||||||
"-C",
|
|
||||||
"--tab",
|
|
||||||
".",
|
|
||||||
tostring(job.file.url),
|
|
||||||
})
|
|
||||||
:stdout(Command.PIPED)
|
:stdout(Command.PIPED)
|
||||||
:stderr(Command.PIPED)
|
:stderr(Command.PIPED)
|
||||||
:spawn()
|
:spawn()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue