This commit is contained in:
Max Kellermann
2024-01-13 22:38:34 +01:00
7 changed files with 36 additions and 21 deletions

View File

@@ -10,6 +10,7 @@
#include "decoder/DecoderAPI.hxx" /* for class StopDecoder */
#include "input/Init.hxx"
#include "input/InputStream.hxx"
#include "fs/NarrowPath.hxx"
#include "fs/Path.hxx"
#include "pcm/AudioFormat.hxx"
#include "cmdline/OptionDef.hxx"
@@ -29,7 +30,7 @@ struct CommandLine {
const char *decoder = nullptr;
const char *uri = nullptr;
Path config_path = nullptr;
FromNarrowPath config_path = nullptr;
bool verbose = false;
};
@@ -53,7 +54,7 @@ ParseCommandLine(int argc, char **argv)
while (auto o = option_parser.Next()) {
switch (Option(o.index)) {
case OPTION_CONFIG:
c.config_path = Path::FromFS(o.value);
c.config_path = o.value;
break;
case OPTION_VERBOSE:
@@ -112,7 +113,7 @@ try {
MyChromaprintDecoderClient client;
if (plugin->file_decode != nullptr) {
try {
plugin->FileDecode(client, Path::FromFS(c.uri));
plugin->FileDecode(client, FromNarrowPath(c.uri));
} catch (StopDecoder) {
}
} else if (plugin->stream_decode != nullptr) {

View File

@@ -10,6 +10,7 @@
#include "archive/ArchivePlugin.hxx"
#include "archive/ArchiveFile.hxx"
#include "archive/ArchiveVisitor.hxx"
#include "fs/NarrowPath.hxx"
#include "fs/Path.hxx"
#include "util/PrintException.hxx"
@@ -54,7 +55,7 @@ try {
}
const char *plugin_name = argv[1];
const Path path = Path::FromFS(argv[2]);
const Path path = FromNarrowPath(argv[2]);
/* initialize MPD */