22import * as cli from "../../codeql-cli/cli" ;
33import vscode from "vscode" ;
44import { FullDatabaseOptions } from "./database-options" ;
5- import { basename , dirname , extname , join , relative } from "path" ;
5+ import { basename , dirname , extname , join } from "path" ;
66import {
77 decodeSourceArchiveUri ,
88 encodeArchiveBasePath ,
@@ -12,7 +12,7 @@ import {
1212import { DatabaseItem , PersistedDatabaseItem } from "./database-item" ;
1313import { isLikelyDatabaseRoot } from "./db-contents-heuristics" ;
1414import { stat } from "fs-extra" ;
15- import { pathsEqual } from "../../pure/files" ;
15+ import { containsPath , pathsEqual } from "../../pure/files" ;
1616import { DatabaseContents } from "./database-contents" ;
1717
1818export class DatabaseItemImpl implements DatabaseItem {
@@ -199,7 +199,7 @@ export class DatabaseItemImpl implements DatabaseItem {
199199 try {
200200 const stats = await stat ( testPath ) ;
201201 if ( stats . isDirectory ( ) ) {
202- return ! relative ( testPath , databasePath ) . startsWith ( ".." ) ;
202+ return containsPath ( testPath , databasePath ) ;
203203 } else {
204204 // database for /one/two/three/test.ql is at /one/two/three/three.testproj
205205 const testdir = dirname ( testPath ) ;
0 commit comments