]>
Commit | Line | Data |
---|---|---|
9c167c12 | 1 | diff -Nur dctc-0.82.0.orig/src/dc_com.c dctc-0.82.0.chng/src/dc_com.c |
2 | --- dctc-0.82.0.orig/src/dc_com.c Wed Apr 3 15:26:36 2002 | |
3 | +++ dctc-0.82.0.chng/src/dc_com.c Mon Jun 3 09:35:10 2002 | |
4 | @@ -203,8 +203,17 @@ | |
5 | char *path; | |
6 | ||
7 | path=getenv("HOME"); | |
8 | - running_dir=g_string_new((path!=NULL)?path:"."); | |
9 | - running_dir=g_string_append(running_dir,"/.dctc/running/"); | |
10 | + if (!path) | |
11 | + path = "."; | |
12 | + | |
13 | + if(getenv("CONFIG_DIR")) | |
14 | + path = g_strconcat(path, "/", getenv("CONFIG_DIR"), | |
15 | + "/dctc/running/", NULL); | |
16 | + else | |
17 | + path = g_strconcat(path, "/.dctc/running/", NULL); | |
18 | + | |
19 | + running_dir=g_string_new(path); | |
20 | + g_free(path); | |
21 | } | |
22 | ||
23 | /* fill the running_dctc array with the path to UDP socket of all running dctc */ | |
24 | diff -Nur dctc-0.82.0.orig/src/main.c dctc-0.82.0.chng/src/main.c | |
25 | --- dctc-0.82.0.orig/src/main.c Fri May 24 17:59:11 2002 | |
26 | +++ dctc-0.82.0.chng/src/main.c Mon Jun 3 11:06:13 2002 | |
27 | @@ -1603,8 +1603,17 @@ | |
28 | struct stat st; | |
29 | ||
30 | path=getenv("HOME"); | |
31 | - local_dctc_sock_path=g_string_new(NULL); | |
32 | - g_string_sprintf(local_dctc_sock_path,"%s/.dctc",(path!=NULL)?path:"."); | |
33 | + if (!path) | |
34 | + path = "."; | |
35 | + | |
36 | + if(getenv("CONFIG_DIR")) | |
37 | + path = g_strconcat(path, "/", getenv("CONFIG_DIR"), "/dctc", NULL); | |
38 | + else | |
39 | + path = g_strconcat(path, "/.dctc", NULL); | |
40 | + | |
41 | + | |
42 | + local_dctc_sock_path=g_string_new(path); | |
43 | + g_free(path); | |
44 | ||
45 | if(stat(local_dctc_sock_path->str,&st)) | |
46 | { |