mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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();
|
Core::App().saveSettings();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
return QString();
|
||||||
}
|
}
|
||||||
return realDefaultPath;
|
return realDefaultPath;
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,6 +155,7 @@ QString FileNameUnsafe(
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
if (path.isEmpty()) return QString();
|
||||||
if (name.isEmpty()) name = qsl(".unknown");
|
if (name.isEmpty()) name = qsl(".unknown");
|
||||||
if (name.at(0) == QChar::fromLatin1('.')) {
|
if (name.at(0) == QChar::fromLatin1('.')) {
|
||||||
if (!QDir().exists(path)) QDir().mkpath(path);
|
if (!QDir().exists(path)) QDir().mkpath(path);
|
||||||
|
|
|
@ -1750,6 +1750,7 @@ void OverlayWidget::downloadMedia() {
|
||||||
} else {
|
} else {
|
||||||
path = Core::App().settings().downloadPath();
|
path = Core::App().settings().downloadPath();
|
||||||
}
|
}
|
||||||
|
if (path.isEmpty()) return;
|
||||||
QString toName;
|
QString toName;
|
||||||
if (_document) {
|
if (_document) {
|
||||||
const auto &location = _document->location(true);
|
const auto &location = _document->location(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue