From 6a4dc281d1d8880b0f300fcaeba6842514bae9a1 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 3 Jan 2024 15:22:24 -0800 Subject: [PATCH] bzip2: fix compilation on Windows NarrowPath is needed. Signed-off-by: Rosen Penev --- src/archive/plugins/Bzip2ArchivePlugin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/archive/plugins/Bzip2ArchivePlugin.cxx b/src/archive/plugins/Bzip2ArchivePlugin.cxx index cd35eac5b..3f18f6067 100644 --- a/src/archive/plugins/Bzip2ArchivePlugin.cxx +++ b/src/archive/plugins/Bzip2ArchivePlugin.cxx @@ -11,6 +11,7 @@ #include "../ArchiveVisitor.hxx" #include "input/InputStream.hxx" #include "input/LocalOpen.hxx" +#include "fs/NarrowPath.hxx" #include "fs/Path.hxx" #include @@ -24,7 +25,7 @@ class Bzip2ArchiveFile final : public ArchiveFile { public: Bzip2ArchiveFile(Path path, InputStreamPtr &&_is) - :name(path.GetBase().c_str()), + :name(NarrowPath(path.GetBase())), istream(std::move(_is)) { // remove .bz2 suffix const size_t len = name.length();