From a40246d3123d4bd0d1be638cd7f7b91274d8f23d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 26 Oct 2013 15:14:54 +0200 Subject: TagFile: use Path instead of const char * --- src/TagFile.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/TagFile.cxx') diff --git a/src/TagFile.cxx b/src/TagFile.cxx index 0e13b0530..785a74987 100644 --- a/src/TagFile.cxx +++ b/src/TagFile.cxx @@ -19,6 +19,7 @@ #include "config.h" #include "TagFile.hxx" +#include "fs/Path.hxx" #include "util/UriUtil.hxx" #include "util/Error.hxx" #include "DecoderList.hxx" @@ -29,15 +30,15 @@ #include bool -tag_file_scan(const char *path_fs, +tag_file_scan(Path path_fs, const struct tag_handler *handler, void *handler_ctx) { - assert(path_fs != nullptr); + assert(!path_fs.IsNull()); assert(handler != nullptr); /* check if there's a suffix and a plugin */ - const char *suffix = uri_get_suffix(path_fs); + const char *suffix = uri_get_suffix(path_fs.c_str()); if (suffix == nullptr) return false; @@ -52,7 +53,7 @@ tag_file_scan(const char *path_fs, do { /* load file tag */ - if (plugin->ScanFile(path_fs, + if (plugin->ScanFile(path_fs.c_str(), *handler, handler_ctx)) break; @@ -61,7 +62,8 @@ tag_file_scan(const char *path_fs, /* open the InputStream (if not already open) */ if (is == nullptr) - is = InputStream::Open(path_fs, mutex, cond, + is = InputStream::Open(path_fs.c_str(), + mutex, cond, IgnoreError()); /* now try the stream_tag() method */ -- cgit v1.2.3