@@ -133,7 +133,7 @@ async function findSourceArchive(
133133
134134async function resolveDatabase (
135135 databasePath : string
136- ) : Promise < DatabaseContents | undefined > {
136+ ) : Promise < DatabaseContents > {
137137
138138 const name = path . basename ( databasePath ) ;
139139
@@ -155,20 +155,6 @@ async function getDbSchemeFiles(dbDirectory: string): Promise<string[]> {
155155 return await glob ( '*.dbscheme' , { cwd : dbDirectory } ) ;
156156}
157157
158- async function resolveRawDataset ( datasetPath : string ) : Promise < DatabaseContents | undefined > {
159- if ( ( await getDbSchemeFiles ( datasetPath ) ) . length > 0 ) {
160- return {
161- kind : DatabaseKind . RawDataset ,
162- name : path . basename ( datasetPath ) ,
163- datasetUri : vscode . Uri . file ( datasetPath ) ,
164- sourceArchiveUri : undefined
165- } ;
166- }
167- else {
168- return undefined ;
169- }
170- }
171-
172158async function resolveDatabaseContents ( uri : vscode . Uri ) : Promise < DatabaseContents > {
173159 if ( uri . scheme !== 'file' ) {
174160 throw new Error ( `Database URI scheme '${ uri . scheme } ' not supported; only 'file' URIs are supported.` ) ;
@@ -178,7 +164,7 @@ async function resolveDatabaseContents(uri: vscode.Uri): Promise<DatabaseContent
178164 throw new InvalidDatabaseError ( `Database '${ databasePath } ' does not exist.` ) ;
179165 }
180166
181- const contents = await resolveDatabase ( databasePath ) || await resolveRawDataset ( databasePath ) ;
167+ const contents = await resolveDatabase ( databasePath ) ;
182168
183169 if ( contents === undefined ) {
184170 throw new InvalidDatabaseError ( `'${ databasePath } ' is not a valid database.` ) ;
0 commit comments