From fb9194b537d6009ff7beade80ee56732dcc45b43 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 3 Jan 2024 12:28:08 -0800 Subject: [PATCH] tests: fix ChromaPrint test on Windows Signed-off-by: Rosen Penev --- test/RunChromaprint.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/RunChromaprint.cxx b/test/RunChromaprint.cxx index 54188b2d5..03d5a8c5d 100644 --- a/test/RunChromaprint.cxx +++ b/test/RunChromaprint.cxx @@ -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) {