7zip/7zip-find-so-in-libexec.diff
Sandro 7d0d042366
Amend patch so library will always be found
This ensures the librarary is always searched for in `/usr/libexec/7zip`
even when `7z` is called using the full path.

- Close RHBZ#2373874
2025-08-15 10:26:53 +02:00

15 lines
561 B
Diff

diff --git a/CPP/7zip/UI/Common/ArchiveCommandLine.cpp b/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
index 7fe18fb..4b79e2d 100644
--- a/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
+++ b/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
@@ -1780,8 +1780,8 @@ FString GetModuleDirPrefix()
FString s;
s = fas2fs(g_ModuleDirPrefix);
- if (s.IsEmpty())
- s = FTEXT(".") FSTRING_PATH_SEPARATOR;
+ if (s.IsEmpty() || s.IsPrefixedBy("/usr/bin"))
+ s = FTEXT("/usr/libexec/7zip") FSTRING_PATH_SEPARATOR;
return s;
/*
setenv("_7ZIP_HOME_DIR", "/test/", 0);