[Pkg-wmaker-commits] [wmtv] 19/48: wmtv: Start without user config file.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Feb 1 20:13:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmtv.
commit 8467807646772aa9c1f05cc3cd713ab36424b8b5
Author: Doug Torrance <dtorrance at piedmont.edu>
Date: Mon Feb 1 00:45:12 2016 -0500
wmtv: Start without user config file.
Patch by Nicolas Boullis <Boullis.Nicolas at libertysurf.fr>. From [1]:
From: Nicolas Boullis <Boullis.Nicolas at libertysurf.fr>
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
---
src/wmtv.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/wmtv.c b/src/wmtv.c
index 7e2d663..bc160d5 100644
--- a/src/wmtv.c
+++ b/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)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmtv.git
More information about the Pkg-wmaker-commits
mailing list