Skip to content

Commit 19d13df

Browse files
author
Christian Weichel
committed
Fix sketch upload
1 parent 63c471e commit 19d13df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arduino-ide-extension/src/node/core-service-impl.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ export class CoreServiceImpl implements CoreService {
7676

7777
console.log('upload', options);
7878
const { uri } = options;
79-
const sketchpath = await this.fileSystem.getFsPath(options.uri);
80-
if (!sketchpath) {
79+
const sketchFilePath = await this.fileSystem.getFsPath(options.uri);
80+
if (!sketchFilePath) {
8181
throw new Error(`Cannot resolve filesystem path for URI: ${uri}.`);
8282
}
83+
const sketchpath = path.dirname(sketchFilePath);
8384

8485
const currentBoard = await this.boardsService.getSelectBoard();
8586
if (!currentBoard) {

0 commit comments

Comments
 (0)