File tree 2 files changed +14
-7
lines changed
2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ export const SUPPRORTED_EXT: string[] = [
8
8
'.html' , '.htm' , '.svg'
9
9
] ;
10
10
11
+ export const isRelativePath = ( pathUrl : string ) => {
12
+ if ( pathUrl . startsWith ( '*' ) ) return false ;
13
+
14
+ return ! path . isAbsolute ( pathUrl ) ;
15
+ }
16
+
17
+
11
18
export class Helper {
12
19
13
20
@@ -23,7 +30,7 @@ export class Helper {
23
30
rootPath = testPath ;
24
31
}
25
32
else {
26
- rootPath = workSpacePath ;
33
+ rootPath = workSpacePath ;
27
34
}
28
35
29
36
if ( ! rootPath . endsWith ( path . sep ) )
@@ -80,8 +87,9 @@ export class Helper {
80
87
81
88
const ignoreFiles = [ ] ;
82
89
ignorePathGlob . forEach ( ignoredPath => {
83
- if ( ! ignoredPath . startsWith ( '/' ) || ! ignoredPath . startsWith ( '\\' ) )
84
- ignoreFiles . push ( workspacePath + path . sep + ignoredPath ) ;
90
+ if ( isRelativePath ( ignoredPath ) )
91
+ ignoreFiles . push ( path . join ( workspacePath , ignoredPath ) ) ;
92
+ else ignoreFiles . push ( ignoredPath ) ;
85
93
} ) ;
86
94
87
95
const proxy = Helper . getProxySetup ( ) ;
Original file line number Diff line number Diff line change @@ -9,10 +9,9 @@ export function activate(context: ExtensionContext) {
9
9
10
10
checkNewAnnouncement ( context . globalState ) ;
11
11
context . subscriptions . push ( commands
12
- . registerCommand ( 'extension.liveServer.goOnline' , ( fileUri ) => {
13
- workspace . saveAll ( ) . then ( ( ) => {
14
- appModel . Golive ( fileUri ? fileUri . fsPath : null ) ;
15
- } ) ;
12
+ . registerCommand ( 'extension.liveServer.goOnline' , async ( fileUri ) => {
13
+ await workspace . saveAll ( ) ;
14
+ appModel . Golive ( fileUri ? fileUri . fsPath : null ) ;
16
15
} )
17
16
) ;
18
17
You can’t perform that action at this time.
0 commit comments