From 4a226189ab954e6c118b213313ece7ccfdff4639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20misaki=20masa?= Date: Sun, 19 Jul 2026 23:54:03 +0800 Subject: [PATCH] Simpliy a little bit --- yazi-plugin/preset/plugins/magick.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/yazi-plugin/preset/plugins/magick.lua b/yazi-plugin/preset/plugins/magick.lua index 398fc2f5..c8b6a994 100644 --- a/yazi-plugin/preset/plugins/magick.lua +++ b/yazi-plugin/preset/plugins/magick.lua @@ -25,13 +25,11 @@ function M:preload(job) return true end - local cmd = M.with_limit() - cmd:arg { "-define", "filename:literal=true" } - local path = tostring(job.file.path) + local cmd = M.with_limit():arg({ "-define", "filename:literal=true" }) if job.args.flatten then - cmd:arg { path, "-flatten" } + cmd:arg { tostring(job.file.path), "-flatten" } else - cmd:arg { "-define", "image:frames=0", path } + cmd:arg { "-define", "image:frames=0", tostring(job.file.path) } end cmd:arg { "-auto-orient", "-strip" }