File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
extensions/ql-vscode/src/databases Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,9 @@ export async function importLocalDatabase(
318318 await commandManager . execute ( "codeQLDatabases.focus" ) ;
319319 void showAndLogInformationMessage (
320320 extLogger ,
321- "Database unzipped and imported successfully." ,
321+ origin . type === "testproj"
322+ ? "Test database imported successfully."
323+ : "Database unzipped and imported successfully." ,
322324 ) ;
323325 }
324326 return item ;
Original file line number Diff line number Diff line change @@ -755,13 +755,12 @@ export class DatabaseUI extends DisposableObject {
755755 // Check if the database is already in the workspace. If
756756 // so, delete it first before importing the new one.
757757 const existingItem = this . databaseManager . findTestDatabase ( uri ) ;
758+ const baseName = basename ( uri . fsPath ) ;
758759 if ( existingItem !== undefined ) {
759760 progress ( {
760761 maxStep : 9 ,
761762 step : 1 ,
762- message : `Removing existing test database ${ basename (
763- uri . fsPath ,
764- ) } `,
763+ message : `Removing existing test database ${ baseName } ` ,
765764 } ) ;
766765 await this . databaseManager . removeDatabaseItem ( existingItem ) ;
767766 }
@@ -774,6 +773,14 @@ export class DatabaseUI extends DisposableObject {
774773 progress ,
775774 this . queryServer . cliServer ,
776775 ) ;
776+
777+ if ( existingItem !== undefined ) {
778+ progress ( {
779+ maxStep : 9 ,
780+ step : 9 ,
781+ message : `Successfully re-imported ${ baseName } ` ,
782+ } ) ;
783+ }
777784 } catch ( e ) {
778785 // rethrow and let this be handled by default error handling.
779786 throw new Error (
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ export class DatabaseManager extends DisposableObject {
256256 dateAdded : Date . now ( ) ,
257257 language : dbItem . language ,
258258 origin : dbItem . origin ,
259+ extensionManagedLocation : dbItem . extensionManagedLocation ,
259260 } ) ;
260261 await this . addDatabaseItem ( newDbItem ) ;
261262 await this . setCurrentDatabaseItem ( newDbItem ) ;
You can’t perform that action at this time.
0 commit comments