Trim file path settings fields prior to save

* Fixes #11630
This commit is contained in:
Jonathan White 2025-01-06 07:16:52 -05:00
parent 4d7eae34c2
commit 831704f3b2
2 changed files with 3 additions and 3 deletions

View file

@ -178,7 +178,7 @@ void BrowserSettingsWidget::loadSettings()
QString BrowserSettingsWidget::resolveCustomProxyLocation() QString BrowserSettingsWidget::resolveCustomProxyLocation()
{ {
auto settings = browserSettings(); auto settings = browserSettings();
auto proxyLocation = m_ui->customProxyLocation->text(); auto proxyLocation = m_ui->customProxyLocation->text().trimmed();
proxyLocation = settings->replaceTildeHomePath(proxyLocation); proxyLocation = settings->replaceTildeHomePath(proxyLocation);
return proxyLocation; return proxyLocation;
} }

View file

@ -90,9 +90,9 @@ void AgentSettingsWidget::loadSettings()
void AgentSettingsWidget::saveSettings() void AgentSettingsWidget::saveSettings()
{ {
auto sshAuthSockOverride = m_ui->sshAuthSockOverrideEdit->text(); auto sshAuthSockOverride = m_ui->sshAuthSockOverrideEdit->text().trimmed();
sshAgent()->setAuthSockOverride(sshAuthSockOverride); sshAgent()->setAuthSockOverride(sshAuthSockOverride);
auto sshSecurityKeyProviderOverride = m_ui->sshSecurityKeyProviderOverrideEdit->text(); auto sshSecurityKeyProviderOverride = m_ui->sshSecurityKeyProviderOverrideEdit->text().trimmed();
sshAgent()->setSecurityKeyProviderOverride(sshSecurityKeyProviderOverride); sshAgent()->setSecurityKeyProviderOverride(sshSecurityKeyProviderOverride);
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
sshAgent()->setUsePageant(m_ui->usePageantRadioButton->isChecked() || m_ui->useBothRadioButton->isChecked()); sshAgent()->setUsePageant(m_ui->usePageantRadioButton->isChecked() || m_ui->useBothRadioButton->isChecked());