Merge pull request #2596 from cdr/rdbeach

vscode.ts: Fix close current folder
This commit is contained in:
Anmol Sethi 2021-01-20 01:59:12 -05:00 committed by GitHub
commit c17f3ffc79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ export class VscodeProvider {
query: ipc.Query,
): Promise<ipc.WorkbenchOptions> {
const { lastVisited } = await settings.read()
const startPath = await this.getFirstPath([
let startPath = await this.getFirstPath([
{ url: query.workspace, workspace: true },
{ url: query.folder, workspace: false },
options.args._ && options.args._.length > 0
@ -46,6 +46,10 @@ export class VscodeProvider {
!options.args["ignore-last-opened"] ? lastVisited : undefined,
])
if (query.ew) {
startPath = undefined
}
settings.write({
lastVisited: startPath,
query,