Browse Source

Use the correct config file on mac+win

pull/112/head
Duke 1 year ago
parent
commit
723eabcecb
  1. 10
      src/connection.cpp

10
src/connection.cpp

@ -597,18 +597,18 @@ QString ConnectionLoader::locateHushConfFile() {
// HSC's have no legacy locations
if (isdragonx) {
auto ticker = "DRAGONX";
auto acname = "DRAGONX";
#ifdef Q_OS_LINUX
auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, QString(".hush/") + ticker + "/" + ticker + ".conf");
auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, QString(".hush/") + acname + "/" + acname + ".conf");
#elif defined(Q_OS_DARWIN)
auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, "Library/Application Support/Hush/HUSH3/HUSH3.conf");
auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, QString("Library/Application Support/Hush/") + acname + "/" + acname + ".conf");
#else
auto confLocation = QStandardPaths::locate(QStandardPaths::AppDataLocation, "../../Hush/HUSH3/HUSH3.conf");
auto confLocation = QStandardPaths::locate(QStandardPaths::AppDataLocation, QString("../../Hush/") + acname + "/" + acname + ".conf");
#endif
qDebug() << "found conf at " << confLocation;
return QDir::cleanPath(confLocation);
}
#ifdef Q_OS_LINUX
auto confLocation = QStandardPaths::locate(QStandardPaths::HomeLocation, ".hush/HUSH3/HUSH3.conf");
if(!QFile(confLocation).exists()) {

Loading…
Cancel
Save