]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
TorManager: check for Tor bin in applicationDirPath
authortobtoht <tob@featherwallet.org>
Fri, 21 Apr 2023 16:00:26 +0000 (18:00 +0200)
committertobtoht <tob@featherwallet.org>
Fri, 21 Apr 2023 16:00:26 +0000 (18:00 +0200)
src/utils/TorManager.cpp

index e600aebd816a7b8e6ecee91b47adf7dad1f65b3b..977711fc83e1bf9ef9f4592823fc39a38223b850 100644 (file)
@@ -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;