@@ -18,7 +18,12 @@ import { Minimatch } from "minimatch";
18
18
import { SettingsUtils } from "./util/SettingsUtils" ;
19
19
import { globSync } from "glob" ;
20
20
import { Uri } from "vscode" ;
21
- import { backwardSlashRegex , cleanWorkspaceFolder } from "./util/FSUtils" ;
21
+ import {
22
+ backwardSlashRegex ,
23
+ cleanWorkspaceFolder ,
24
+ normalizePath ,
25
+ } from "./util/FSUtils" ;
26
+ import { getChannel } from "../extension" ;
22
27
23
28
const PROCESSOR_GROUP_FOLDER = ".cobolplugin" ;
24
29
const PROCESSOR_GROUP_PGM = "pgm_conf.json" ;
@@ -28,25 +33,32 @@ export function loadProcessorGroupCopybookPaths(
28
33
documentUri : string ,
29
34
dialectType : string ,
30
35
) : string [ ] {
31
- return loadProcessorGroupSettings (
36
+ const result = loadProcessorGroupSettings (
32
37
documentUri ,
33
38
"libs" ,
34
39
[ ] as string [ ] ,
35
40
dialectType ,
36
41
) ;
42
+ return result . map ( ( s ) => normalizePath ( s ) ) ;
37
43
}
38
44
39
45
export function loadProcessorGroupCopybookPathsConfig (
40
46
item : { scopeUri : string } ,
41
47
configObject : string [ ] ,
42
48
) : string [ ] {
43
49
const config = [
44
- ...loadProcessorGroupSettings ( item . scopeUri , "libs" , [ ] as string [ ] ) ,
50
+ ...loadProcessorGroupSettings ( item . scopeUri , "libs" , [ ] as string [ ] ) . map (
51
+ ( s ) => normalizePath ( s ) ,
52
+ ) ,
45
53
...configObject ,
46
54
] ;
47
55
return SettingsUtils . getWorkspaceFoldersPath ( true )
48
- . map ( ( folder ) => globSync ( config . map ( ele => ele . replace ( backwardSlashRegex , "/" ) ) ,
49
- { cwd : cleanWorkspaceFolder ( folder ) } ) )
56
+ . map ( ( folder ) =>
57
+ globSync (
58
+ config . map ( ( ele ) => ele . replace ( backwardSlashRegex , "/" ) ) ,
59
+ { cwd : cleanWorkspaceFolder ( folder ) } ,
60
+ ) ,
61
+ )
50
62
. reduce ( ( acc , curVal ) => {
51
63
return acc . concat ( curVal ) ;
52
64
} , [ ] ) ;
0 commit comments