From 53fe41cecb281bbd877043691a1500ee9cca03d6 Mon Sep 17 00:00:00 2001 From: dengzhongyuan Date: Fri, 16 Jan 2026 13:25:46 +0800 Subject: [PATCH] fix: Simplify header name assignment in FileTask - Removed the addition of the base directory name when calculating the header name. - Directly set the header name to the relative path, streamlining the logic for path handling. --- 3rdparty/pzip/src/file_task.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/3rdparty/pzip/src/file_task.cpp b/3rdparty/pzip/src/file_task.cpp index 487baa7a..7c89b32f 100644 --- a/3rdparty/pzip/src/file_task.cpp +++ b/3rdparty/pzip/src/file_task.cpp @@ -111,9 +111,7 @@ Error FileTask::reset(const fs::path& filePath, const fs::path& relativeTo) { // 如果无法计算相对路径,使用文件名 header.name = path.filename().string(); } else { - // 加上基础目录名 - fs::path baseName = relativeTo.filename(); - header.name = utils::toZipPath(baseName / relPath); + header.name = utils::toZipPath(relPath); } } else { header.name = utils::toZipPath(path.filename());