[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2919: Handle spaces in the Tor version number we get from 'getinfo (vidalia/trunk/src/torcontrol)
Author: edmanm
Date: 2008-08-01 20:04:58 -0400 (Fri, 01 Aug 2008)
New Revision: 2919
Modified:
vidalia/trunk/src/torcontrol/torcontrol.cpp
Log:
Handle spaces in the Tor version number we get from 'getinfo version' since
Tor has included svn revision numbers in its response (e.g. "0.2.0.30
(r12345)") for a while now.
Modified: vidalia/trunk/src/torcontrol/torcontrol.cpp
===================================================================
--- vidalia/trunk/src/torcontrol/torcontrol.cpp 2008-07-30 13:35:08 UTC (rev 2918)
+++ vidalia/trunk/src/torcontrol/torcontrol.cpp 2008-08-02 00:04:58 UTC (rev 2919)
@@ -603,7 +603,7 @@
versionString = _torVersion;
/* Split the version string at either "." or "-" characters */
- QStringList parts = versionString.split(QRegExp("\\.|-"));
+ QStringList parts = versionString.split(QRegExp("\\.|-|\\ "));
if (parts.size() >= 4) {
major = (quint8)parts.at(0).toUInt();
minor = (quint8)parts.at(1).toUInt();