[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2212: If the user's vidalia.conf contains an empty value for the T (in trunk: . src/vidalia/config)
Author: edmanm
Date: 2007-12-11 22:28:31 -0500 (Tue, 11 Dec 2007)
New Revision: 2212
Modified:
trunk/
trunk/src/vidalia/config/torsettings.cpp
Log:
r2294@lysithea: edmanm | 2007-12-11 22:17:27 -0500
If the user's vidalia.conf contains an empty value for the Tor executable,
use the default.
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /local/vidalia/trunk [r2294] on 0108964c-5b0b-4c9e-969f-e2288315d100
Modified: trunk/src/vidalia/config/torsettings.cpp
===================================================================
--- trunk/src/vidalia/config/torsettings.cpp 2007-12-12 03:28:18 UTC (rev 2211)
+++ trunk/src/vidalia/config/torsettings.cpp 2007-12-12 03:28:31 UTC (rev 2212)
@@ -141,7 +141,10 @@
QString
TorSettings::getExecutable() const
{
- return QDir::convertSeparators(localValue(SETTING_TOR_EXECUTABLE).toString());
+ QString tor = localValue(SETTING_TOR_EXECUTABLE).toString();
+ if (tor.isEmpty()) /* Don't let the Tor executable name be empty */
+ tor = defaultValue(SETTING_TOR_EXECUTABLE).toString();
+ return QDir::convertSeparators(tor);
}
/** Sets the location and name of Tor's executable to the given string. */