diff --git a/js/ui/extensionDownloader.js b/js/ui/extensionDownloader.js index 306aaf14f..08ebc2fec 100644 --- a/js/ui/extensionDownloader.js +++ b/js/ui/extensionDownloader.js @@ -108,6 +108,9 @@ function gotExtensionZipFile(session, message, uuid, dir, callback, errback) { } function downloadExtensionUpdate(uuid) { + if (!Main.extensionManager.updatesSupported) + return; + let dir = Gio.File.new_for_path( GLib.build_filenamev([global.userdatadir, 'extension-updates', uuid])); @@ -126,6 +129,9 @@ function downloadExtensionUpdate(uuid) { } function checkForUpdates() { + if (!Main.extensionManager.updatesSupported) + return; + let metadatas = {}; Main.extensionManager.getUuids().forEach(uuid => { let extension = Main.extensionManager.lookup(uuid); diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index f2e8db79d..4fab0c334 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -60,6 +60,11 @@ var ExtensionManager = class { ExtensionDownloader.checkForUpdates(); } + get updatesSupported() { + const appSys = Shell.AppSystem.get_default(); + return appSys.lookup_app('org.gnome.Extensions.desktop') !== null; + } + lookup(uuid) { return this._extensions.get(uuid); } @@ -481,6 +486,9 @@ var ExtensionManager = class { } _installExtensionUpdates() { + if (!this.updatesSupported) + return; + FileUtils.collectFromDatadirs('extension-updates', true, (dir, info) => { let fileType = info.get_file_type(); if (fileType !== Gio.FileType.DIRECTORY)