[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit c0d83963263e00a8b166bdb406ac60592cab9e2e
Author: Tomás Touceda <chiiph@xxxxxxxxxxxxxx>
Date:   Fri Jan 20 19:59:51 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 183e78f..493f29e 100644
--- a/src/vidalia/MainWindow.cpp
+++ b/src/vidalia/MainWindow.cpp
@@ -592,9 +592,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();



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits