From b62d77571b0d9cc881974dd270ca7368dafb88ca Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Sat, 12 Mar 2011 02:17:27 +0000 Subject: [PATCH] * When called with -R, only remove art_cache and files.db in case users use an imporant directory as their db dir. * Touch up log directory handling. If there is no log dir, but there is a db dir, store the log in the db dir. --- minidlna.c | 11 ++++++++++- minidlna.conf | 3 +++ upnpglobalvars.c | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/minidlna.c b/minidlna.c index 17b1d9c..a8853f9 100644 --- a/minidlna.c +++ b/minidlna.c @@ -546,6 +546,15 @@ init(int argc, char * * argv) } } } + if( log_path[0] == '\0' ) + { + if( db_path[0] == '\0' ) + strncpy(log_path, DEFAULT_LOG_PATH, PATH_MAX); + else + strncpy(log_path, db_path, PATH_MAX); + } + if( db_path[0] == '\0' ) + strncpy(db_path, DEFAULT_DB_PATH, PATH_MAX); /* command line arguments processing */ for(i=1; i