From 7585d786132d88823b87c43fec9ff030ac71f928 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sat, 24 Jan 2026 17:55:31 +0800 Subject: [PATCH] Add changelog --- .luarc.json | 3 +++ CHANGELOG.md | 5 +++++ yazi-plugin/preset/plugins/extract.lua | 15 ++++----------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.luarc.json b/.luarc.json index f68d3f55..53b151a1 100644 --- a/.luarc.json +++ b/.luarc.json @@ -1,6 +1,9 @@ { "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", "runtime.version": "Lua 5.4", + "runtime.special": { + "fail": "error" + }, "workspace.library": ["~/.config/yazi/plugins/types.yazi/"], "diagnostics.disable": ["redefined-local"] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b9eaca8..03c08279 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/): ## [Unreleased] +### Fixed + +- Archive extraction fails for target paths with non-ASCII characters on Windows ([#3607]) + ## [v26.1.22] ### Added @@ -1612,3 +1616,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/): [#3566]: https://github.com/sxyazi/yazi/pull/3566 [#3582]: https://github.com/sxyazi/yazi/pull/3582 [#3594]: https://github.com/sxyazi/yazi/pull/3594 +[#3607]: https://github.com/sxyazi/yazi/pull/3607 diff --git a/yazi-plugin/preset/plugins/extract.lua b/yazi-plugin/preset/plugins/extract.lua index 13a5cf2c..f2cfbb28 100644 --- a/yazi-plugin/preset/plugins/extract.lua +++ b/yazi-plugin/preset/plugins/extract.lua @@ -99,17 +99,10 @@ function M:tidy(from, to, tmp) fail("Failed to determine a target for '%s'", from) end - local move - if only then - move = fs.rename(outs[1].url, target) - if not move then - fail('Failed to move "%s"', outs[1].url) - end - else - move = fs.rename(tmp, target) - if not move then - fail('Failed to move "%s"', tmp) - end + if only and not fs.rename(outs[1].url, target) then + fail('Failed to move "%s" to "%s"', outs[1].url, target) + elseif not only and not fs.rename(tmp, target) then + fail('Failed to move "%s" to "%s"', tmp, target) end fs.remove("dir", tmp) end