extensionDownloader: Remove pending updates with extension
When an extension is uninstalled, there is no point in keeping a pending update: If the update didn't fail (which it currently does), we would end up sneakily reinstalling the extension. https://gitlab.gnome.org/GNOME/gnome-shell/issues/2343
This commit is contained in:
parent
b97fc02e57
commit
d3939a38a3
@ -56,6 +56,15 @@ function uninstallExtension(uuid) {
|
||||
return false;
|
||||
|
||||
FileUtils.recursivelyDeleteDir(extension.dir, true);
|
||||
|
||||
try {
|
||||
const updatesDir = Gio.File.new_for_path(GLib.build_filenamev(
|
||||
[global.userdatadir, 'extension-updates', extension.uuid]));
|
||||
FileUtils.recursivelyDeleteDir(updatesDir, true);
|
||||
} catch (e) {
|
||||
// not an error
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user