From 723eabcecbdfc6e91a8d18d23b28a82074333d72 Mon Sep 17 00:00:00 2001 From: Duke Date: Wed, 25 Jan 2023 05:16:06 -0800 Subject: [PATCH] Use the correct config file on mac+win --- src/connection.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/connection.cpp b/src/connection.cpp index 66129a7..695bca7 100644 --- a/src/connection.cpp +++ b/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()) {