fastfetch: update to 2.30.1
[oi-userland.git] / components / archiver / p7zip / patches / 06-plugindir.patch
blobe3850eeed78127f22fb20a1d77ba1f4098ad06e9
1 --- p7zip_15.14.1/CPP/myWindows/mySplitCommandLine.cpp.~1~ 2015-10-10 15:37:36.000000000 +0300
2 +++ p7zip_15.14.1/CPP/myWindows/mySplitCommandLine.cpp 2016-06-08 13:24:30.762224258 +0300
3 @@ -106,9 +106,15 @@
5 { // define P7ZIP_HOME_DIR
6 static char p7zip_home_dir[MAX_PATH];
7 - AString dir,name;
8 - my_windows_split_path(arguments[0],dir,name);
9 - snprintf(p7zip_home_dir,sizeof(p7zip_home_dir),"P7ZIP_HOME_DIR=%s/",(const char *)dir);
10 +#if defined(_LP64) || defined (__amd64)
11 + static char default_path[] = "/usr/lib/64/7z";
12 +#else
13 + static char default_path[] = "/usr/lib/7z";
14 +#endif
15 + char *env;
16 + if ((env = getenv("P7ZIP_HOME_DIR")) == NULL)
17 + env = default_path;
18 + snprintf(p7zip_home_dir,sizeof(p7zip_home_dir),"P7ZIP_HOME_DIR=%s/",env);
19 p7zip_home_dir[sizeof(p7zip_home_dir)-1] = 0;
20 putenv(p7zip_home_dir);