diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp
index 9d0020d0e..fa90de2a7 100644
--- a/retroshare-gui/src/main.cpp
+++ b/retroshare-gui/src/main.cpp
@@ -589,9 +589,10 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
// Now that we know the Tor service running, and we know the SSL id, we can make sure it provides a viable hidden service
- std::string tor_hidden_service_dir = RsAccounts::AccountDirectory() + "/hidden_service/" ;
+ std::string account_directory = RsAccounts::AccountDirectory();
+ std::string tor_hidden_service_dir = account_directory + "/hidden_service/" ;
- RsTor::setTorDataDirectory(RsApplication::dataDirectory().toStdString() + "/tor/");
+ RsTor::setTorDataDirectory(account_directory + "/tor/");
RsTor::setHiddenServiceDirectory(tor_hidden_service_dir); // re-set it, because now it's changed to the specific location that is run
RsDirUtil::checkCreateDirectory(std::string(tor_hidden_service_dir)) ;
diff --git a/retroshare-gui/src/rshare.cpp b/retroshare-gui/src/rshare.cpp
index 3575034af..b35546d32 100644
--- a/retroshare-gui/src/rshare.cpp
+++ b/retroshare-gui/src/rshare.cpp
@@ -559,41 +559,6 @@ void RsApplication::initPlugins()
LanguageSupport::translatePlugins(options.language);
}
-/** Returns the directory RetroShare uses for its data files. */
-QString RsApplication::dataDirectory()
-{
- if(!options.optBaseDir.empty())
- return QString::fromUtf8(options.optBaseDir.c_str());
- else
- return defaultDataDirectory();
-}
-
-/** Returns the default location of RetroShare's data directory. */
-QString
-RsApplication::defaultDataDirectory()
-{
-#if defined(Q_OS_WIN)
- return (win32_app_data_folder() + "\\RetroShare");
-#else
- return (QDir::homePath() + "/.retroshare");
-#endif
-}
-
-/** Creates RsApplication's data directory, if it doesn't already exist. */
-bool
-RsApplication::createDataDirectory(QString *errmsg)
-{
- QDir datadir(dataDirectory());
- if (!datadir.exists()) {
- QString path = datadir.absolutePath();
- if (!datadir.mkpath(path)) {
- return err(errmsg,
- tr("Could not create data directory: %1").arg(path));
- }
- }
- return true;
-}
-
/** Set RsApplication's data directory - externally */
bool RsApplication::setConfigDirectory(const QString& dir)
{
diff --git a/retroshare-gui/src/rshare.h b/retroshare-gui/src/rshare.h
index ff079b1e8..3a8c6c4de 100644
--- a/retroshare-gui/src/rshare.h
+++ b/retroshare-gui/src/rshare.h
@@ -132,13 +132,6 @@ public:
/** Returns Rshare's application startup time. */
static QDateTime startupTime();
- /** Returns the location Rshare uses for its data files. */
- static QString dataDirectory();
- /** Returns the default location of Rshare's data directory. */
- static QString defaultDataDirectory();
- /** Creates Rshare's data directory, if it doesn't already exist. */
- static bool createDataDirectory(QString *errmsg);
-
/** Writes msg with severity level to RetroShare's log. */
static Log::LogMessage log(Log::LogLevel level, QString msg);
diff --git a/retroshare-gui/src/util/retroshareWin32.cpp b/retroshare-gui/src/util/retroshareWin32.cpp
index 5693ef514..3f4c7ce8e 100644
--- a/retroshare-gui/src/util/retroshareWin32.cpp
+++ b/retroshare-gui/src/util/retroshareWin32.cpp
@@ -30,39 +30,8 @@
#include
#endif
-#include
#include "retroshareWin32.h"
-
-/** Finds the location of the "special" Windows folder using the given CSIDL
- * value. If the folder cannot be found, the given default path is used. */
-QString
-win32_get_folder_location(int /*folder*/, QString defaultPath)
-{
-#if 0
- TCHAR path[MAX_PATH+1];
- LPITEMIDLIST idl;
- IMalloc *m;
- HRESULT result;
-
- /* Find the location of %PROGRAMFILES% */
- if (SUCCEEDED(SHGetSpecialFolderLocation(NULL, folder, &idl))) {
- /* Get the path from the IDL */
- result = SHGetPathFromIDList(idl, path);
- SHGetMalloc(&m);
- if (m) {
- m->Release();
- }
- if (SUCCEEDED(result)) {
- QT_WA(return QString::fromUtf16((const ushort *)path);,
- return QString::fromLocal8Bit((char *)path);)
- }
- }
-#endif
-
- return defaultPath;
-}
-
/** Returns the value in keyName at keyLocation.
* Returns an empty QString if the keyName doesn't exist */
QString
@@ -151,31 +120,3 @@ win32_registry_remove_key(QString keyLocation, QString keyName)
Q_UNUSED(keyName);
#endif
}
-
-/** Gets the location of the user's %PROGRAMFILES% folder. */
-QString
-win32_program_files_folder()
-{
- return win32_get_folder_location(
-#if 0
- CSIDL_PROGRAM_FILES,
-#else
- 0,
-#endif
- QDir::rootPath() + "\\Program Files");
-}
-
-/** Gets the location of the user's %APPDATA% folder. */
-QString
-win32_app_data_folder()
-{
- return win32_get_folder_location(
-#if 0
- CSIDL_APPDATA,
-#else
- 0,
-#endif
- QDir::homePath() + "\\Application Data");
-
-}
-
diff --git a/retroshare-gui/src/util/retroshareWin32.h b/retroshare-gui/src/util/retroshareWin32.h
index 5027af3be..3c1a70d7c 100644
--- a/retroshare-gui/src/util/retroshareWin32.h
+++ b/retroshare-gui/src/util/retroshareWin32.h
@@ -21,15 +21,8 @@
#pragma once
-#include
#include
-/** Retrieves the location of the user's %PROGRAMFILES% folder. */
-QString win32_program_files_folder();
-
-/** Retrieves the location of the user's %APPDATA% folder. */
-QString win32_app_data_folder();
-
/** Returns value of keyName or empty QString if keyName doesn't exist */
QString win32_registry_get_key_value(QString keyLocation, QString keyName);