Delete database after removing it from query server control.
This commit is contained in:
@@ -811,6 +811,9 @@ export class DatabaseManager extends DisposableObject {
|
|||||||
vscode.workspace.updateWorkspaceFolders(folderIndex, 1);
|
vscode.workspace.updateWorkspaceFolders(folderIndex, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove this database item from the allow-list
|
||||||
|
await this.deregisterDatabase(progress, token, item);
|
||||||
|
|
||||||
// Delete folder from file system only if it is controlled by the extension
|
// Delete folder from file system only if it is controlled by the extension
|
||||||
if (this.isExtensionControlledLocation(item.databaseUri)) {
|
if (this.isExtensionControlledLocation(item.databaseUri)) {
|
||||||
logger.log('Deleting database from filesystem.');
|
logger.log('Deleting database from filesystem.');
|
||||||
@@ -819,9 +822,6 @@ export class DatabaseManager extends DisposableObject {
|
|||||||
e => logger.log(`Failed to delete '${item.databaseUri.fsPath}'. Reason: ${e.message}`));
|
e => logger.log(`Failed to delete '${item.databaseUri.fsPath}'. Reason: ${e.message}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove this database item from the allow-list
|
|
||||||
await this.deregisterDatabase(progress, token, item);
|
|
||||||
|
|
||||||
// note that we use undefined as the item in order to reset the entire tree
|
// note that we use undefined as the item in order to reset the entire tree
|
||||||
this._onDidChangeDatabaseItem.fire({
|
this._onDidChangeDatabaseItem.fire({
|
||||||
item: undefined,
|
item: undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user