]> git.pld-linux.org Git - packages/avifile.git/blame - avifile-etc_dir.patch
- s/CONFIG_DIR/ETC_DIR/
[packages/avifile.git] / avifile-etc_dir.patch
CommitLineData
6f186639 1diff -Nru avifile0.7-0.7.32/lib/common/Registry.cpp avifile0.7-0.7.32.new/lib/common/Registry.cpp
2--- avifile0.7-0.7.32/lib/common/Registry.cpp Fri Oct 4 09:07:33 2002
3+++ avifile0.7-0.7.32.new/lib/common/Registry.cpp Sun Mar 23 13:59:08 2003
4@@ -33,15 +33,22 @@
5 if (!config)
6 {
7 char* home;
8- home = getenv("HOME");
9- if (home == 0)
10+ int etc_dir_used = 0;
11+ home = getenv("ETC_DIR");
12+ if (home) etc_dir_used = 1;
13+ else
14 {
15- struct passwd* pwent = getpwuid(getuid());
16- home = pwent->pw_dir;
17+ home = getenv("HOME");
18+ if (home == 0)
19+ {
20+ struct passwd* pwent = getpwuid(getuid());
21+ home = pwent->pw_dir;
22+ }
23 }
24 avm::string s(home);
25 if (!sConfigDir)
26- s += "/.avm";
27+ if (etc_dir_used) s+= "/avm";
28+ else s += "/.avm";
29 else
30 {
31 s += "/";
This page took 0.040244 seconds and 4 git commands to generate.