From adabeffa7f4501676e8a3cc05a96ab1814993ab7 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 26 May 2016 17:01:03 +0200 Subject: [PATCH] Do not force the need for a trailing slash in mpd_root in blissify --- src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 6dc7940..145e075 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,7 @@ #include #include #include +#include #include @@ -24,7 +25,10 @@ int main(int argc, char** argv) { exit(EXIT_FAILURE); } - const char *base_path = argv[1]; + char base_path[DEFAULT_STRING_LENGTH + 1] = ""; + strncat(base_path, argv[1], DEFAULT_STRING_LENGTH); + strip_trailing_slash(base_path); + strncat(base_path, "/", 1 - strlen(base_path)); // Connect to SQLite db sqlite3 *dbh;