ConfigFile, CommandLine: use the Path class

This commit is contained in:
Max Kellermann
2013-01-29 17:23:35 +01:00
parent eb8922f346
commit feb8d5b82f
12 changed files with 96 additions and 72 deletions

@ -26,6 +26,7 @@
#include "PlaylistVector.hxx"
#include "conf.h"
#include "tag.h"
#include "fs/Path.hxx"
#include <iostream>
using std::cout;
@ -76,7 +77,7 @@ main(int argc, char **argv)
return 1;
}
const char *const config_path = argv[1];
const Path config_path = Path::FromFS(argv[1]);
const char *const plugin_name = argv[2];
const DatabasePlugin *plugin = GetDatabasePluginByName(plugin_name);
@ -94,7 +95,7 @@ main(int argc, char **argv)
config_global_init();
if (!config_read_file(config_path, &error)) {
if (!ReadConfigFile(config_path, &error)) {
cerr << error->message << endl;
g_error_free(error);
return EXIT_FAILURE;