bzip2: fix compilation on Windows

NarrowPath is needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-01-03 15:22:24 -08:00 committed by Max Kellermann
parent 26831a417a
commit 6a4dc281d1

View File

@ -11,6 +11,7 @@
#include "../ArchiveVisitor.hxx"
#include "input/InputStream.hxx"
#include "input/LocalOpen.hxx"
#include "fs/NarrowPath.hxx"
#include "fs/Path.hxx"
#include <bzlib.h>
@ -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();