diff --git a/extensions/ql-vscode/CHANGELOG.md b/extensions/ql-vscode/CHANGELOG.md index 9c351a9e787..69c6d0d0d66 100644 --- a/extensions/ql-vscode/CHANGELOG.md +++ b/extensions/ql-vscode/CHANGELOG.md @@ -2,6 +2,8 @@ ## [UNRELEASED] +- Avoid displaying an error when removing orphaned databases and the storage folder does not exist. [#748](https://github.com/github/vscode-codeql/pull/748) + ## 1.4.2 - 2 February 2021 - Add a status bar item for the CodeQL CLI to show the current version. [#741](https://github.com/github/vscode-codeql/pull/741) diff --git a/extensions/ql-vscode/src/databases-ui.ts b/extensions/ql-vscode/src/databases-ui.ts index 1b1a7b79d7e..94393629d86 100644 --- a/extensions/ql-vscode/src/databases-ui.ts +++ b/extensions/ql-vscode/src/databases-ui.ts @@ -379,8 +379,8 @@ export class DatabaseUI extends DisposableObject { let dbDirs = undefined; if ( - !(await fs.pathExists(this.storagePath) || - !(await fs.stat(this.storagePath)).isDirectory()) + !(await fs.pathExists(this.storagePath)) || + !(await fs.stat(this.storagePath)).isDirectory() ) { logger.log('Missing or invalid storage directory. Not trying to remove orphaned databases.'); return;