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
This commit is contained in:
Sandro 2025-08-15 10:26:53 +02:00
commit 7d0d042366
No known key found for this signature in database
GPG key ID: 68D0FF74FE9F382A

View file

@ -1,10 +1,14 @@
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
@@ -1751,7 +1751,7 @@ FString GetModuleDirPrefix()
@@ -1780,8 +1780,8 @@ FString GetModuleDirPrefix()
FString s;
s = fas2fs(g_ModuleDirPrefix);
if (s.IsEmpty())
- 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;
/*