--- /dev/null
+diff -Nru avifile0.7-0.7.32/lib/common/Registry.cpp avifile0.7-0.7.32.new/lib/common/Registry.cpp
+--- avifile0.7-0.7.32/lib/common/Registry.cpp Fri Oct 4 09:07:33 2002
++++ avifile0.7-0.7.32.new/lib/common/Registry.cpp Sun Mar 23 13:59:08 2003
+@@ -33,15 +33,22 @@
+ if (!config)
+ {
+ char* home;
+- home = getenv("HOME");
+- if (home == 0)
++ int config_dir_used = 0;
++ home = getenv("CONFIG_DIR");
++ if (home) config_dir_used = 1;
++ else
+ {
+- struct passwd* pwent = getpwuid(getuid());
+- home = pwent->pw_dir;
++ home = getenv("HOME");
++ if (home == 0)
++ {
++ struct passwd* pwent = getpwuid(getuid());
++ home = pwent->pw_dir;
++ }
+ }
+ avm::string s(home);
+ if (!sConfigDir)
+- s += "/.avm";
++ if (config_dir_used) s+= "/avm";
++ else s += "/.avm";
+ else
+ {
+ s += "/";