summaryrefslogtreecommitdiff
path: root/community/vidalia/revert-e36785b3bc90fd33eed45e5ca6d334780d5fab30.patch
blob: d61f3e86e71dadabd3e490d3fc285dd93cd2c014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp
index 85bc62e..b13f80b 100644
--- a/src/vidalia/MainWindow.cpp
+++ b/src/vidalia/MainWindow.cpp
@@ -626,9 +626,6 @@ MainWindow::launchBrowserFromDirectory()
 
   /** Directory for the browser */
   QString browserDirectory = settings.getBrowserDirectory();
-  if(QDir(browserDirectory).isRelative())
-    browserDirectory = QDir(QDir::toNativeSeparators(QCoreApplication::applicationDirPath()
-                                                     + "/" + browserDirectory)).canonicalPath();
 
   /** Relative path to the browser executable from the browserDirectory */
   QString browserExecutable = QDir::toNativeSeparators(browserDirectory + "/" + settings.getBrowserExecutable());
@@ -1068,20 +1065,6 @@ MainWindow::start()
   QString torrc = settings.getTorrc();
   QFileInfo torrcInfo(torrc);
 
-  if(QDir(torrcInfo.filePath()).isRelative()) {
-    torrc = QCoreApplication::applicationDirPath() + "/" + torrc;
-
-    QFileInfo newTorrcInfo(torrc);
-    if(!newTorrcInfo.exists() and torrcInfo.exists()) {
-      torrc = QDir(QCoreApplication::applicationDirPath()).relativeFilePath(torrcInfo.absoluteFilePath());
-      vWarn("Automigrating configuration for Torrc:\nOld path: %1\nNew path: %2")
-        .arg(newTorrcInfo.filePath())
-        .arg(torrc);
-      settings.setTorrc(torrc);
-      torrc = QCoreApplication::applicationDirPath() + "/" + torrc;
-    }
-  }
-
   if(settings.bootstrap()) {
     QString boottorrc = settings.bootstrapFrom();
     vNotice(tr("Bootstrapping torrc from %1 to %2")
@@ -1104,20 +1087,6 @@ MainWindow::start()
   QString dataDirectory = settings.getDataDirectory();
   QFileInfo dataDirectoryInfo(dataDirectory);
 
-  if(QDir(dataDirectory).isRelative()) {
-    dataDirectory = QCoreApplication::applicationDirPath() + "/" + dataDirectory;
-
-    QFileInfo newDataDirectoryInfo(dataDirectory);
-    if(!newDataDirectoryInfo.exists() and dataDirectoryInfo.exists()) {
-      dataDirectory = QDir(QCoreApplication::applicationDirPath()).relativeFilePath(dataDirectoryInfo.absoluteFilePath());
-      vWarn("Automigrating configuration for DataDirectory:\nOld path: %1\nNew path: %2")
-        .arg(newDataDirectoryInfo.absoluteFilePath())
-        .arg(dataDirectory);
-      settings.setDataDirectory(dataDirectory);
-      dataDirectory = QCoreApplication::applicationDirPath() + "/" + dataDirectory;
-    }
-  }
-
   QString expDataDirectory = QDir(expand_filename(dataDirectory)).canonicalPath();
   if (!dataDirectory.isEmpty())
     args << "DataDirectory" << expDataDirectory;
@@ -1175,20 +1144,6 @@ MainWindow::start()
   QString torExecutable = settings.getExecutable();
   QFileInfo torExecutableInfo(torExecutable);
 
-  if(QDir(torExecutableInfo.filePath()).isRelative()) {
-    torExecutable = QCoreApplication::applicationDirPath() + "/" + torExecutable;
-
-    QFileInfo newTorExecutableInfo(torExecutable);
-    if(!newTorExecutableInfo.exists() and torExecutableInfo.exists()) {
-      torExecutable = QDir(QCoreApplication::applicationDirPath()).relativeFilePath(torExecutableInfo.absoluteFilePath());
-      vWarn("Automigrating configuration for TorExecutable:\nOld path: %1\nNew path: %2")
-        .arg(newTorExecutableInfo.filePath())
-        .arg(torExecutable);
-      settings.setExecutable(torExecutable);
-      torExecutable = QCoreApplication::applicationDirPath() + "/" + torExecutable;
-    }
-  }
-
   _torControl->start(torExecutable, args);
 }
 
@@ -1251,8 +1206,6 @@ MainWindow::started()
   /* Try to connect to Tor's control port */
   if(settings.autoControlPort()) {
     QString dataDirectory = settings.getDataDirectory();
-    if(QDir(dataDirectory).isRelative())
-      dataDirectory = QCoreApplication::applicationDirPath() + "/" + dataDirectory;
 
     QFile file(QString("%1/port.conf").arg(QDir(expand_filename(dataDirectory)).canonicalPath()));
     int tries = 0, maxtries = 5;