--- p7zip_4.55/CPP/myWindows/mySplitCommandLine.cpp.orig Sat Apr 21 02:06:20 2007
+++ p7zip_4.55/CPP/myWindows/mySplitCommandLine.cpp Fri Feb 18 15:34:14 2011
@@ -14,9 +14,11 @@
{ // define P7ZIP_HOME_DIR
static char p7zip_home_dir[MAX_PATH];
- AString dir,name;
- my_windows_split_path(arguments[0],dir,name);
- snprintf(p7zip_home_dir,sizeof(p7zip_home_dir),"P7ZIP_HOME_DIR=%s/",(const char *)dir);
+ static char default_path[] = "/usr/lib/7z";
+ char *env;
+ if ((env = getenv("P7ZIP_HOME_DIR")) == NULL)
+ env = default_path;
+ snprintf(p7zip_home_dir,sizeof(p7zip_home_dir),"P7ZIP_HOME_DIR=%s/",env);
p7zip_home_dir[sizeof(p7zip_home_dir)-1] = 0;
putenv(p7zip_home_dir);
}