diff options
author | Max Kellermann <max@duempel.org> | 2014-02-08 13:21:50 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-08 13:25:44 +0100 |
commit | fe7c6fee348a3263ce0c97a83547749725f681cb (patch) | |
tree | 9773e269458ed7847fa9d566a20dfdd6db89b59a /src/archive/plugins/Bzip2ArchivePlugin.cxx | |
parent | 9906daeca71b7e552721f85f3696d9e6a20f7a5b (diff) | |
download | mpd-fe7c6fee348a3263ce0c97a83547749725f681cb.tar.gz mpd-fe7c6fee348a3263ce0c97a83547749725f681cb.tar.xz mpd-fe7c6fee348a3263ce0c97a83547749725f681cb.zip |
ArchivePlugin: pass Path to open()
Diffstat (limited to 'src/archive/plugins/Bzip2ArchivePlugin.cxx')
-rw-r--r-- | src/archive/plugins/Bzip2ArchivePlugin.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/archive/plugins/Bzip2ArchivePlugin.cxx b/src/archive/plugins/Bzip2ArchivePlugin.cxx index 272a3f81c..8cb9af122 100644 --- a/src/archive/plugins/Bzip2ArchivePlugin.cxx +++ b/src/archive/plugins/Bzip2ArchivePlugin.cxx @@ -32,6 +32,7 @@ #include "util/Error.hxx" #include "util/Domain.hxx" #include "fs/Traits.hxx" +#include "fs/Path.hxx" #include <bzlib.h> @@ -49,9 +50,9 @@ public: std::string name; InputStream *const istream; - Bzip2ArchiveFile(const char *path, InputStream *_is) + Bzip2ArchiveFile(Path path, InputStream *_is) :ArchiveFile(bz2_archive_plugin), - name(PathTraitsUTF8::GetBase(path)), + name(PathTraitsFS::GetBase(path.c_str())), istream(_is) { // remove .bz2 suffix const size_t len = name.length(); @@ -142,11 +143,12 @@ Bzip2InputStream::Close() /* archive open && listing routine */ static ArchiveFile * -bz2_open(const char *pathname, Error &error) +bz2_open(Path pathname, Error &error) { static Mutex mutex; static Cond cond; - InputStream *is = InputStream::OpenReady(pathname, mutex, cond, error); + InputStream *is = InputStream::OpenReady(pathname.c_str(), mutex, cond, + error); if (is == nullptr) return nullptr; |