mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-29 08:43:42 -04:00
Fix problem with blank db_dirs, now that it isn't necessary anymore :)
This commit is contained in:
parent
c0752c13ac
commit
55bc7986de
@ -404,9 +404,14 @@ int config_read(char *file) {
|
|||||||
free(config.mp3dir);
|
free(config.mp3dir);
|
||||||
config.mp3dir=strdup(path_buffer);
|
config.mp3dir=strdup(path_buffer);
|
||||||
|
|
||||||
realpath(config.dbdir,path_buffer);
|
if(config.dbdir) {
|
||||||
free(config.dbdir);
|
DPRINTF(E_LOG,L_MISC,"You are using db_dir rather than "
|
||||||
config.dbdir=strdup(path_buffer);
|
"db_type/db_parms. This will stop working at "
|
||||||
|
"some point. Please fix your config");
|
||||||
|
realpath(config.dbdir,path_buffer);
|
||||||
|
free(config.dbdir);
|
||||||
|
config.dbdir=strdup(path_buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* sanity check the paths */
|
/* sanity check the paths */
|
||||||
@ -433,7 +438,7 @@ int config_read(char *file) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!config_existdir(config.dbdir)) {
|
if((config.dbdir)&&(!config_existdir(config.dbdir))) {
|
||||||
/* try to make it */
|
/* try to make it */
|
||||||
if(config_makedir(config.dbdir)) {
|
if(config_makedir(config.dbdir)) {
|
||||||
DPRINTF(E_LOG,L_CONF,"Database dir %s does not exist, cannot create: %s\n",
|
DPRINTF(E_LOG,L_CONF,"Database dir %s does not exist, cannot create: %s\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user