Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
GNOME:STABLE:41
gnome-shell
gnome-shell-Pass-cancellable-when-querying-file...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnome-shell-Pass-cancellable-when-querying-file-info.patch of Package gnome-shell
diff --git a/js/ui/background.js b/js/ui/background.js index 1f7c5e5..d170d7b 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -327,6 +327,8 @@ var Background = GObject.registerClass({ return; this.isLoaded = true; + if (this._cancellable?.is_cancelled()) + return; let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => { this.emit('loaded'); @@ -482,11 +484,17 @@ var Background = GObject.registerClass({ } async _loadFile(file) { - const info = await file.query_info_async( - Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, - Gio.FileQueryInfoFlags.NONE, - 0, - null); + let info; + try { + info = await file.query_info_async( + Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, + Gio.FileQueryInfoFlags.NONE, + 0, + this._cancellable); + } catch (e) { + this._setLoaded(); + return; + } const contentType = info.get_content_type(); if (contentType === 'application/xml')
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor