2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Don't autodownload files if sandbox prevents it.

Partially fixes #25308.
This commit is contained in:
John Preston
2022-11-08 18:24:08 +04:00
parent ab5792f59f
commit 092923fe6e
4 changed files with 9 additions and 2 deletions

View File

@@ -587,6 +587,12 @@ void Application::saveSettings() {
Local::writeSettings();
}
bool Application::canSaveFileWithoutAskingForPath() const {
return !Core::App().settings().askDownloadPath()
&& (!KSandbox::isInside()
|| !Core::App().settings().downloadPath().isEmpty());
}
MTP::Config &Application::fallbackProductionConfig() const {
if (!_fallbackProductionConfig) {
_fallbackProductionConfig = std::make_unique<MTP::Config>(