File: 01_conf_location.patch

package info (click to toggle)
gnuais 0.3.3-9.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 608 kB
  • sloc: ansic: 5,790; sql: 33; makefile: 4; sh: 3
file content (26 lines) | stat: -rw-r--r-- 1,525 bytes parent folder | download | duplicates (6)
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
Description: In debian, the gnuais.conf-example is installed in
  /usr/share/doc/gnuais/examples/. Since gnuais will copy this file into
  ~/.config/gnuais/config the first time it runs, this patch is needed.
  It basically just updates the references to that file in the source code.
Forwarded: doesn't make sense upstream
Author: Ruben Undheim <ruben.undheim@gmail.com>
Index: gnuais/src/cfgfile.c
===================================================================
--- gnuais.orig/src/cfgfile.c
+++ gnuais/src/cfgfile.c
@@ -364,13 +364,13 @@ int read_cfgfile(char *f, struct cfgcmd
 			if(tmp_file == NULL){
 				tmp_file = fopen("/usr/local/share/doc/gnuais/gnuais.conf-example","r");	
 				if(tmp_file == NULL){
-					tmp_file = fopen("/usr/share/doc/gnuais/gnuais.conf-example","r");	
+					tmp_file = fopen("/usr/share/doc/gnuais/examples/gnuais.conf-example","r");	
 					if(tmp_file == NULL){
 						hlog(LOG_ERR,"No gnuais.conf-example found to be copied to ~/.config/gnuais/config");
 					}
 					else {
 						hlog(LOG_NOTICE, "Using gnuais.conf-example as a starting point for ~/.config/gnuais/config...");
-						ret = cpfile(conf_home_folder,"/usr/share/doc/gnuais/gnuais.conf-example");
+						ret = cpfile(conf_home_folder,"/usr/share/doc/gnuais/examples/gnuais.conf-example");
 						if(ret == -1) hlog(LOG_ERR, "Could not copy configuration file to the home folder");
 						else hlog(LOG_NOTICE, "DONE creating configuration file (~/.config/gnuais/config). You should edit this file manually!");
 					}