Patch by Nicolas Boullis <[email protected]>. From [1]:
From: Nicolas Boullis <[email protected]> Subject: wmtv: does not start without user's ~/.wmtvrc Date: Sun, 18 Nov 2001 00:17:26 +0100 Hi ! The current version of wmtv does not start if the user does not have a ~/.wmtvrc configuration file, while one could expect it to work with the system wide configuration file /etc/wmtvrc. This patch allows wmtv to start with the system wide configuration file alone. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=120024 --- wmtv/src/wmtv.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/wmtv/src/wmtv.c b/wmtv/src/wmtv.c index 7e2d663..bc160d5 100644 --- a/wmtv/src/wmtv.c +++ b/wmtv/src/wmtv.c @@ -1130,18 +1130,20 @@ InitConfig(void) int i; char temp[128]; - strcpy(temp, "/etc/wmtvrc"); - ParseRCFile(temp, wmtv_keys); - ParseRCFile2(temp); - strncpy(temp, (char *)getenv("HOME"), (sizeof(char)*128)); strcat(temp, "/.wmtvrc"); ParseRCFile(temp, wmtv_keys); ParseRCFile2(temp); if (norcfile) { - fprintf(stderr, "wmtv: error - config file not found\n"); - exit(1); + strcpy(temp, "/etc/wmtvrc"); + ParseRCFile(temp, wmtv_keys); + ParseRCFile2(temp); + + if (norcfile) { + fprintf(stderr, "wmtv: error - config file not found\n"); + exit(1); + } } if (maxpreset != NULL) -- 2.5.0 -- To unsubscribe, send mail to [email protected].
