[tor-commits] [vidalia/master] Try removing the port.conf file before using auto as *Port

chiiph at torproject.org chiiph at torproject.org
Mon Jan 23 16:45:21 UTC 2012


commit 098b460546307baced227daa7ea042d7297503a8
Author: Tomás Touceda <chiiph at torproject.org>
Date:   Fri Jan 20 20:02:22 2012 -0300

    Try removing the port.conf file before using auto as *Port
---
 src/vidalia/MainWindow.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp
index a60509f..8e00123 100644
--- a/src/vidalia/MainWindow.cpp
+++ b/src/vidalia/MainWindow.cpp
@@ -1069,9 +1069,13 @@ MainWindow::start()
   
   if(settings.getControlMethod() == ControlMethod::Port) {
     if(settings.autoControlPort()) {
+      QString portconf = QString("%1/port.conf").arg(expDataDirectory);
+      if(!QFile::remove(portconf))
+        vWarn(QString("Unable to remove %s, may be it didn't existed.").arg(portconf));
+
       args << "ControlPort" << "auto";
       args << "SocksPort" << "auto";
-      args << "ControlPortWriteToFile" << QString("%1/port.conf").arg(expDataDirectory);
+      args << "ControlPortWriteToFile" << portconf;
     } else {
       /* Add the intended control port value */
       quint16 controlPort = settings.getControlPort();





More information about the tor-commits mailing list