background: Handle errors when loading wallpapers
Since it happens while setting up the startup animation, we will get stuck inside that animation and block input if it fails. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5062 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2176>
This commit is contained in:
parent
1272ce37a7
commit
348fcdaa77
@ -496,11 +496,17 @@ var Background = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _loadFile(file) {
|
async _loadFile(file) {
|
||||||
const info = await file.query_info_async(
|
let info;
|
||||||
Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
|
try {
|
||||||
Gio.FileQueryInfoFlags.NONE,
|
info = await file.query_info_async(
|
||||||
0,
|
Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
|
||||||
null);
|
Gio.FileQueryInfoFlags.NONE,
|
||||||
|
0,
|
||||||
|
null);
|
||||||
|
} catch (e) {
|
||||||
|
this._setLoaded();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const contentType = info.get_content_type();
|
const contentType = info.get_content_type();
|
||||||
if (contentType === 'application/xml')
|
if (contentType === 'application/xml')
|
||||||
|
Loading…
Reference in New Issue
Block a user