From 5d77cf9473718d750ae71bd182155bae13278e7f Mon Sep 17 00:00:00 2001 From: Oleg Korshul Date: Wed, 1 Mar 2017 13:23:11 +0300 Subject: [PATCH] add ../ path for dll path --- HtmlFile/HtmlFile.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/HtmlFile/HtmlFile.cpp b/HtmlFile/HtmlFile.cpp index e53a067ebe..5fb90e85ea 100644 --- a/HtmlFile/HtmlFile.cpp +++ b/HtmlFile/HtmlFile.cpp @@ -350,8 +350,10 @@ int CHtmlFile::Convert(const std::vector& arFiles, const std::wstr case 0: // child process { std::string sLibraryDir = sProgramm; - if (std::string::npos != sProgramm.find_last_of('/')) - sLibraryDir = "LD_LIBRARY_PATH=" + sProgramm.substr(0, sProgramm.find_last_of('/')); + std::string::size_type posLast = sProgramm.find_last_of('/'); + std::string sProgrammDir = sProgramm.substr(0, posLast); + if (std::string::npos != posLast) + sLibraryDir = "LD_LIBRARY_PATH=" + sProgrammDir + ":" + sProgrammDir + "/../"; if (!IsLinuxXVFB()) {