mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 07:05:57 -05:00
fix problem with missing paths in config file
This commit is contained in:
parent
9245e282e8
commit
50fcf93ec6
@ -373,19 +373,6 @@ int config_read(char *file) {
|
||||
fclose(fin);
|
||||
free(buffer);
|
||||
|
||||
/* Set the directory components to realpaths */
|
||||
realpath(config.web_root,path_buffer);
|
||||
free(config.web_root);
|
||||
config.web_root=strdup(path_buffer);
|
||||
|
||||
realpath(config.mp3dir,path_buffer);
|
||||
free(config.mp3dir);
|
||||
config.mp3dir=strdup(path_buffer);
|
||||
|
||||
realpath(config.dbdir,path_buffer);
|
||||
free(config.dbdir);
|
||||
config.dbdir=strdup(path_buffer);
|
||||
|
||||
/* check to see if all required elements are satisfied */
|
||||
pce=config_elements;
|
||||
err=0;
|
||||
@ -412,6 +399,19 @@ int config_read(char *file) {
|
||||
pce++;
|
||||
}
|
||||
|
||||
/* Set the directory components to realpaths */
|
||||
realpath(config.web_root,path_buffer);
|
||||
free(config.web_root);
|
||||
config.web_root=strdup(path_buffer);
|
||||
|
||||
realpath(config.mp3dir,path_buffer);
|
||||
free(config.mp3dir);
|
||||
config.mp3dir=strdup(path_buffer);
|
||||
|
||||
realpath(config.dbdir,path_buffer);
|
||||
free(config.dbdir);
|
||||
config.dbdir=strdup(path_buffer);
|
||||
|
||||
|
||||
/* sanity check the paths */
|
||||
sprintf(path_buffer,"%s/index.html",config.web_root);
|
||||
|
Loading…
Reference in New Issue
Block a user