mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 22:27:20 +02:00
Handle cancel for default download path in Linux sandbox
This commit is contained in:
parent
9229c57e7a
commit
0cd0ad7a5b
3 changed files with 3 additions and 0 deletions
|
@ -195,6 +195,7 @@ QString DefaultDownloadPath(not_null<Main::Session*> session) {
|
|||
Core::App().saveSettings();
|
||||
return result;
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
return realDefaultPath;
|
||||
}
|
||||
|
|
|
@ -155,6 +155,7 @@ QString FileNameUnsafe(
|
|||
return path;
|
||||
}
|
||||
}();
|
||||
if (path.isEmpty()) return QString();
|
||||
if (name.isEmpty()) name = qsl(".unknown");
|
||||
if (name.at(0) == QChar::fromLatin1('.')) {
|
||||
if (!QDir().exists(path)) QDir().mkpath(path);
|
||||
|
|
|
@ -1750,6 +1750,7 @@ void OverlayWidget::downloadMedia() {
|
|||
} else {
|
||||
path = Core::App().settings().downloadPath();
|
||||
}
|
||||
if (path.isEmpty()) return;
|
||||
QString toName;
|
||||
if (_document) {
|
||||
const auto &location = _document->location(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue