diff options
author | Max Kellermann <max@duempel.org> | 2013-10-26 15:14:54 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-26 15:38:29 +0200 |
commit | a40246d3123d4bd0d1be638cd7f7b91274d8f23d (patch) | |
tree | d1384fdce2b186c00b4697d5475c97bf4dbc4b41 /src/TagFile.cxx | |
parent | 4a5aad0948eb782ec6b74a1f038c0e5635c1bb9b (diff) | |
download | mpd-a40246d3123d4bd0d1be638cd7f7b91274d8f23d.tar.gz mpd-a40246d3123d4bd0d1be638cd7f7b91274d8f23d.tar.xz mpd-a40246d3123d4bd0d1be638cd7f7b91274d8f23d.zip |
TagFile: use Path instead of const char *
Diffstat (limited to 'src/TagFile.cxx')
-rw-r--r-- | src/TagFile.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
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 <assert.h> 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 */ |