make sure tor executable from config path can be reached

This commit is contained in:
csoler 2018-03-03 19:04:54 +01:00
parent b587ac8835
commit 919417a137
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

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