Handle cancel for default download path in Linux sandbox
This commit is contained in:
parent
9229c57e7a
commit
0cd0ad7a5b
|
@ -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…
Reference in New Issue