Do not force the need for a trailing slash in mpd_root in blissify
This commit is contained in:
parent
e7345c9d4d
commit
adabeffa7f
@ -1,6 +1,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include <sqlite3.h>
|
#include <sqlite3.h>
|
||||||
|
|
||||||
@ -24,7 +25,10 @@ int main(int argc, char** argv) {
|
|||||||
exit(EXIT_FAILURE);
|
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
|
// Connect to SQLite db
|
||||||
sqlite3 *dbh;
|
sqlite3 *dbh;
|
||||||
|
Loading…
Reference in New Issue
Block a user