From f68fab53a7d4f3d969db728b0fed35975803d3a9 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 3 Jan 2024 15:21:16 -0800 Subject: [PATCH] zzip: fix compilation on Windows NarrowPath is needed. Signed-off-by: Rosen Penev --- src/archive/plugins/ZzipArchivePlugin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/archive/plugins/ZzipArchivePlugin.cxx b/src/archive/plugins/ZzipArchivePlugin.cxx index 6676b5a94..3ba1d7a49 100644 --- a/src/archive/plugins/ZzipArchivePlugin.cxx +++ b/src/archive/plugins/ZzipArchivePlugin.cxx @@ -12,6 +12,7 @@ #include "input/InputStream.hxx" #include "lib/fmt/PathFormatter.hxx" #include "lib/fmt/RuntimeError.hxx" +#include "fs/NarrowPath.hxx" #include "fs/Path.hxx" #include "lib/fmt/SystemError.hxx" #include "util/UTF8.hxx" @@ -24,7 +25,7 @@ struct ZzipDir { ZZIP_DIR *const dir; explicit ZzipDir(Path path) - :dir(zzip_dir_open(path.c_str(), nullptr)) { + :dir(zzip_dir_open(NarrowPath(path), nullptr)) { if (dir == nullptr) throw FmtRuntimeError("Failed to open ZIP file {}", path);