Skip to content

Commit 8d86ea1

Browse files
committed
fixed #41 import files from folder on Windows
1 parent e40490f commit 8d86ea1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

commands/compile.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,18 @@ function importFiles(files) {
147147
}
148148

149149
export async function importFolder(uri: vscode.Uri): Promise<any> {
150-
const folder = uri.path;
150+
const folder = uri.fsPath;
151151
if (fs.lstatSync(folder).isFile()) {
152152
return importFiles([folder]);
153153
}
154154
glob(
155-
"**/*.{cls,inc,mac,int}",
155+
"*.{cls,inc,mac,int}",
156156
{
157157
cwd: folder,
158+
matchBase: true,
158159
nocase: true,
159160
},
160161
(error, files) => importFiles(
161-
files.map((name) => path.join(folder, name)),
162-
),
162+
files.map((name) => path.join(folder, name))),
163163
);
164164
}

0 commit comments

Comments
 (0)