fix --profile-dir argument
This commit is contained in:
parent
6e5b340bcc
commit
ea025f5958
|
@ -504,7 +504,7 @@ void MainWindow::startBarrier()
|
||||||
// launched the process (e.g. when launched with elevation). setting the
|
// launched the process (e.g. when launched with elevation). setting the
|
||||||
// profile dir on launch ensures it uses the same profile dir is used
|
// profile dir on launch ensures it uses the same profile dir is used
|
||||||
// no matter how its relaunched.
|
// no matter how its relaunched.
|
||||||
args << "--profile-dir" << getProfileRootForArg();
|
args << "--profile-dir" << QString::fromStdString("\"" + DataDirectories::profile() + "\"");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((barrierType() == barrierClient && !clientArgs(args, app))
|
if ((barrierType() == barrierClient && !clientArgs(args, app))
|
||||||
|
@ -1253,20 +1253,6 @@ void MainWindow::bonjourInstallFinished()
|
||||||
m_pCheckBoxAutoConfig->setChecked(true);
|
m_pCheckBoxAutoConfig->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MainWindow::getProfileRootForArg()
|
|
||||||
{
|
|
||||||
auto dir = QString::fromStdString(DataDirectories::profile());
|
|
||||||
|
|
||||||
// HACK: strip our app name since we're returning the root dir.
|
|
||||||
#if defined(Q_OS_WIN)
|
|
||||||
dir.replace("\\Barrier", "");
|
|
||||||
#else
|
|
||||||
dir.replace("/.barrier", "");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return QString("\"%1\"").arg(dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::windowStateChanged()
|
void MainWindow::windowStateChanged()
|
||||||
{
|
{
|
||||||
if (windowState() == Qt::WindowMinimized && appConfig().getMinimizeToTray())
|
if (windowState() == Qt::WindowMinimized && appConfig().getMinimizeToTray())
|
||||||
|
|
|
@ -166,7 +166,6 @@ public slots:
|
||||||
bool isBonjourRunning();
|
bool isBonjourRunning();
|
||||||
void downloadBonjour();
|
void downloadBonjour();
|
||||||
void promptAutoConfig();
|
void promptAutoConfig();
|
||||||
QString getProfileRootForArg();
|
|
||||||
void checkConnected(const QString& line);
|
void checkConnected(const QString& line);
|
||||||
void checkFingerprint(const QString& line);
|
void checkFingerprint(const QString& line);
|
||||||
void restartBarrier();
|
void restartBarrier();
|
||||||
|
|
Loading…
Reference in New Issue