mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix wipeServer to use the new 0.5 API: get list at info/collections, a hash; delete storage/<engine>.
This commit is contained in:
parent
a2e27b0d93
commit
8c87f37ff7
@ -1267,19 +1267,18 @@ WeaveSvc.prototype = {
|
||||
wipeServer: function WeaveSvc_wipeServer(engines)
|
||||
this._catch(this._notify("wipe-server", "", function() {
|
||||
// Grab all the collections for the user
|
||||
let userURL = this.userURL + "/";
|
||||
let res = new Resource(userURL);
|
||||
let res = new Resource(this.userURL + "/info/collections");
|
||||
res.get();
|
||||
|
||||
// Get the array of collections and delete each one
|
||||
let allCollections = JSON.parse(res.data);
|
||||
for each (let name in allCollections) {
|
||||
for (let name in allCollections) {
|
||||
try {
|
||||
// If we have a list of engines, make sure it's one we want
|
||||
if (engines && engines.indexOf(name) == -1)
|
||||
continue;
|
||||
|
||||
new Resource(userURL + name).delete();
|
||||
new Resource(this.userURL + "/storage/" + name).delete();
|
||||
}
|
||||
catch(ex) {
|
||||
this._log.debug("Exception on wipe of '" + name + "': " + Utils.exceptionStr(ex));
|
||||
|
Loading…
Reference in New Issue
Block a user