Skip to content

Commit fe957db

Browse files
committed
When importing from a directory, check for testproj
Use the testproj style import when using the folder icon to import a database. This means that if the database directory ends with `testproj` copy the database into workspace storage and make it available for re-importing when the origin database changes.
1 parent d572551 commit fe957db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extensions/ql-vscode/src/databases/local-databases-ui.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,14 +995,15 @@ export class DatabaseUI extends DisposableObject {
995995
return undefined;
996996
}
997997

998-
if (byFolder) {
998+
if (byFolder && !uri.fsPath.endsWith("testproj")) {
999999
const fixedUri = await this.fixDbUri(uri);
10001000
// we are selecting a database folder
10011001
return await this.databaseManager.openDatabase(fixedUri, {
10021002
type: "folder",
10031003
});
10041004
} else {
1005-
// we are selecting a database archive. Must unzip into a workspace-controlled area
1005+
// we are selecting a database archive or a testproj.
1006+
// Unzip archives (if an archive) and copy into a workspace-controlled area
10061007
// before importing.
10071008
return await importLocalDatabase(
10081009
this.app.commands,

0 commit comments

Comments
 (0)