mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-16 17:27:38 +00:00
TorManager: TOR_INSTALLED, set fallback tor dir
This commit is contained in:
parent
be5fd97fe0
commit
fce3b03388
1 changed files with 8 additions and 2 deletions
|
@ -21,9 +21,15 @@ TorManager::TorManager(QObject *parent)
|
|||
connect(m_checkConnectionTimer, &QTimer::timeout, this, &TorManager::checkConnection);
|
||||
|
||||
this->torDir = Config::defaultConfigDir().filePath("tor");
|
||||
|
||||
#if defined(TOR_INSTALLED)
|
||||
// When installed, use directory relative to application path.
|
||||
this->torDir = QDir(Utils::applicationPath()).filePath("tor");
|
||||
QString installedTorPath = QDir(Utils::applicationPath()).filePath("tor");
|
||||
bool installedTorPathIsDir = QFileInfo(torPath).isDir();
|
||||
if (installedTorPathIsDir) {
|
||||
this->torDir = installedTorPath;
|
||||
} else {
|
||||
this->torDir = Utils::applicationPath();
|
||||
}
|
||||
#endif
|
||||
|
||||
this->torDataPath = Config::defaultConfigDir().filePath("tor/data");
|
||||
|
|
Loading…
Reference in a new issue