From 2179c073cd9f582cdc653d4da702475a23566d4b Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 21 Apr 2023 18:00:26 +0200 Subject: [PATCH] TorManager: check for Tor bin in applicationDirPath --- src/utils/TorManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/TorManager.cpp b/src/utils/TorManager.cpp index e600aeb..977711f 100644 --- a/src/utils/TorManager.cpp +++ b/src/utils/TorManager.cpp @@ -72,6 +72,12 @@ void TorManager::start() { return; } + QFile torFile{this->torPath}; + QString alternativeTorFile = QCoreApplication::applicationDirPath() + "/tor"; + if (!torFile.exists() && QFileInfo(alternativeTorFile).isFile()) { + this->torPath = alternativeTorFile; + } + qDebug() << QString("Start process: %1").arg(this->torPath); m_restarts += 1;