Skip to content

Commit 4eced2f

Browse files
committed
download all files when no project
if you set a global launch configuration in user settings (or workspace settings), then event.session.workspaceFolder will be undefined. In that case, just download all files in the workspace. Fixes #76
1 parent 14bc8ca commit 4eced2f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ All notable changes to the "ev3dev-browser" extension will be documented in this
33

44
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
55

6+
## Unreleased
7+
### Fixed
8+
- Files are not downloaded when using global launch configuration
9+
610
## 1.0.1 - 2019-02-02
711
### Fixed
812
- Duplicate listed devices in quick-pick on Windows

src/extension.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ async function handleCustomDebugEvent(event: vscode.DebugSessionCustomEvent): Pr
105105
break;
106106
}
107107

108-
// optionally download before running
108+
// optionally download before running - workspaceFolder can be undefined
109+
// if the request did not come from a specific project, in which case we
110+
// download all projects
109111
const folder = event.session.workspaceFolder;
110-
if (args.download !== false && folder && !await download(folder, device)) {
112+
if (args.download !== false && !(folder ? await download(folder, device) : await downloadAll())) {
111113
// download() shows error messages, so don't show additional message here.
112114
await event.session.customRequest('ev3devBrowser.debugger.terminate');
113115
break;

0 commit comments

Comments
 (0)