1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
From: Markus Koschany <apo@debian.org>
Date: Thu, 22 Nov 2012 18:37:41 +0100
Subject: change-configuration-path
Per default the configuration is loaded from /usr/share/games/etw instead
of $HOME/.etw/. This patch fixes the issue.
---
etw/menu_config.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/etw/menu_config.c b/etw/menu_config.c
index 9f1ef30..163b8c2 100644
--- a/etw/menu_config.c
+++ b/etw/menu_config.c
@@ -372,9 +372,16 @@ void load_config(FILE *f)
void read_menu_config(void)
{
FILE *f;
+ char path[1024];
+ snprintf(path, 1024, "%setw.cfg", TEMP_DIR);
+
D(bug("Reading configuration...\n"/*-*/));
- f=fopen("etw.cfg"/*-*/,"r");
+ f=fopen(path/*-*/,"r");
+
+ if (f == NULL) {
+ f=fopen("etw.cfg"/*-*/,"r");
+ }
newpitches=CheckNewPitches();
|