File tree 1 file changed +9
-3
lines changed
arduino-ide-extension/src/browser/widgets/cloud-sketchbook
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,11 @@ import { Message } from '@theia/core/shared/@phosphor/messaging';
6
6
import { SketchesServiceClientImpl } from '../../../common/protocol/sketches-service-client-impl' ;
7
7
import { SketchControl } from '../../contributions/sketch-control' ;
8
8
import { LocalCacheFsProvider } from '../../local-cache/local-cache-fs-provider' ;
9
- import { REMOTE_SKETCHBOOK_FOLDER } from '../../utils/constants' ;
10
-
9
+ import {
10
+ ARDUINO_CLOUD_FOLDER ,
11
+ REMOTE_SKETCHBOOK_FOLDER ,
12
+ } from '../../utils/constants' ;
13
+ import * as path from 'path' ;
11
14
@injectable ( )
12
15
export class CloudSketchbookWidget extends SketchbookWidget {
13
16
@inject ( CloudSketchbookCompositeWidget )
@@ -47,7 +50,10 @@ export class CloudSketchbookWidget extends SketchbookWidget {
47
50
async checkCloudEnabled ( ) : Promise < void > {
48
51
const currentSketch = await this . sketchesServiceClient . currentSketch ( ) ;
49
52
const isCloudSketch =
50
- currentSketch && currentSketch . uri . includes ( REMOTE_SKETCHBOOK_FOLDER ) ;
53
+ currentSketch &&
54
+ currentSketch . uri . includes (
55
+ path . join ( REMOTE_SKETCHBOOK_FOLDER , ARDUINO_CLOUD_FOLDER )
56
+ ) ;
51
57
52
58
if ( this . arduinoPreferences [ 'arduino.cloud.enabled' ] ) {
53
59
this . sketchbookTreesContainer . mode = 'multiple-document' ;
You can’t perform that action at this time.
0 commit comments