Merge pull request #1205 from csoler/v0.6-TorOnly

make sure tor executable from config path can be reached
This commit is contained in:
csoler 2018-03-03 19:09:46 +01:00 committed by GitHub
commit b1e768731c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -446,7 +446,8 @@ QString TorManagerPrivate::torExecutablePath() const
{ {
SettingsObject settings(QStringLiteral("tor")); SettingsObject settings(QStringLiteral("tor"));
QString path = settings.read("executablePath").toString(); QString path = settings.read("executablePath").toString();
if (!path.isEmpty())
if (!path.isEmpty() && QFile::exists(path))
return path; return path;
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@ -456,6 +457,7 @@ QString TorManagerPrivate::torExecutablePath() const
#endif #endif
path = qApp->applicationDirPath(); path = qApp->applicationDirPath();
if (QFile::exists(path + filename)) if (QFile::exists(path + filename))
return path + filename; return path + filename;