]>
Commit | Line | Data |
---|---|---|
4206b892 AM |
1 | diff -urN dctc-0.85.0.org/src/dc_com.c dctc-0.85.0/src/dc_com.c |
2 | --- dctc-0.85.0.org/src/dc_com.c Thu Mar 13 19:03:42 2003 | |
3 | +++ dctc-0.85.0/src/dc_com.c Thu Mar 13 19:04:16 2003 | |
4 | @@ -206,8 +206,17 @@ | |
9c167c12 | 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 */ | |
4206b892 AM |
24 | diff -urN dctc-0.85.0.org/src/main.c dctc-0.85.0/src/main.c |
25 | --- dctc-0.85.0.org/src/main.c Thu Mar 13 19:03:42 2003 | |
26 | +++ dctc-0.85.0/src/main.c Thu Mar 13 19:06:06 2003 | |
27 | @@ -1675,7 +1675,16 @@ | |
28 | free(socket_dir); | |
29 | } else { | |
30 | path=getenv("HOME"); | |
31 | - g_string_sprintf(local_dctc_sock_path,"%s/.dctc",(path!=NULL)?path:"."); | |
32 | + if (!path) | |
33 | + path = "."; | |
34 | + | |
35 | + if(getenv("CONFIG_DIR")) | |
36 | + path = g_strconcat(path, "/", getenv("CONFIG_DIR"), "/dctc", NULL); | |
37 | + else | |
38 | + path = g_strconcat(path, "/.dctc", NULL); | |
39 | + | |
40 | + local_dctc_sock_path=g_string_new(path); | |
41 | + g_free(path); | |
42 | } | |
9c167c12 | 43 | |
44 | if(stat(local_dctc_sock_path->str,&st)) |