File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
extensions/ql-vscode/src/databases Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -666,7 +666,9 @@ function isFile(databaseUrl: string) {
666666 *
667667 * @param databasePath The full path to the unzipped database
668668 */
669- async function ensureZippedSourceLocation ( databasePath : string ) : Promise < void > {
669+ export async function ensureZippedSourceLocation (
670+ databasePath : string ,
671+ ) : Promise < void > {
670672 const srcFolderPath = join ( databasePath , "src" ) ;
671673 const srcZipPath = `${ srcFolderPath } .zip` ;
672674
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ import { DatabaseResolver } from "./database-resolver";
4343import { telemetryListener } from "../../common/vscode/telemetry" ;
4444import type { LanguageContextStore } from "../../language-context-store" ;
4545import type { DatabaseOrigin } from "./database-origin" ;
46+ import { ensureZippedSourceLocation } from "../database-fetcher" ;
4647
4748/**
4849 * The name of the key in the workspaceState dictionary in which we
@@ -260,6 +261,7 @@ export class DatabaseManager extends DisposableObject {
260261
261262 await this . removeDatabaseItem ( dbItem ) ;
262263 await copy ( dbItem . origin . path , databaseUri . fsPath ) ;
264+ await ensureZippedSourceLocation ( databaseUri . fsPath ) ;
263265 const newDbItem = new DatabaseItemImpl ( databaseUri , dbItem . contents , {
264266 dateAdded : Date . now ( ) ,
265267 language : dbItem . language ,
You can’t perform that action at this time.
0 commit comments