diff --git a/js/ui/background.js b/js/ui/background.js index 21359d0a8..0b53f3fd0 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -496,11 +496,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, + null); + } catch (e) { + this._setLoaded(); + return; + } const contentType = info.get_content_type(); if (contentType === 'application/xml')