From aa2bed8d39fbb5e553810619786e632fa6ef83ed Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Thu, 6 Aug 2020 10:54:26 +0200 Subject: [PATCH] fixed sketch opening. This was the happy path. Signed-off-by: Akos Kitta --- .../src/browser/contributions/open-sketch.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arduino-ide-extension/src/browser/contributions/open-sketch.ts b/arduino-ide-extension/src/browser/contributions/open-sketch.ts index ca4452ac..7d5b378a 100644 --- a/arduino-ide-extension/src/browser/contributions/open-sketch.ts +++ b/arduino-ide-extension/src/browser/contributions/open-sketch.ts @@ -119,7 +119,10 @@ export class OpenSketch extends SketchContribution { const sketchFilePath = filePaths[0]; const sketchFileUri = await this.fileSystemExt.getUri(sketchFilePath); const sketch = await this.sketchService.getSketchFolder(sketchFileUri); - if (!sketch && sketchFileUri.endsWith('.ino')) { + if (sketch) { + return sketch; + } + if (sketchFileUri.endsWith('.ino')) { const name = new URI(sketchFileUri).path.name; const nameWithExt = this.labelProvider.getName(new URI(sketchFileUri)); const { response } = await remote.dialog.showMessageBox({