2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Use temp directory for downloads in Linux sandbox by default

This commit is contained in:
Ilya Fedin
2023-01-02 17:22:21 +04:00
committed by John Preston
parent c49dac57b7
commit 7307f0b1a5
5 changed files with 10 additions and 35 deletions

View File

@@ -252,15 +252,6 @@ void Application::run() {
return;
}
if (KSandbox::isInside()) {
const auto path = settings().downloadPath();
if (!path.isEmpty()
&& path != FileDialog::Tmp()
&& !base::CanReadDirectory(path)) {
settings().setDownloadPath(QString());
}
}
_translator = std::make_unique<Lang::Translator>();
QCoreApplication::instance()->installTranslator(_translator.get());
@@ -606,8 +597,7 @@ bool Application::canReadDefaultDownloadPath(bool always) const {
}
bool Application::canSaveFileWithoutAskingForPath() const {
return !Core::App().settings().askDownloadPath()
&& canReadDefaultDownloadPath();
return !Core::App().settings().askDownloadPath();
}
MTP::Config &Application::fallbackProductionConfig() const {