Open donaldtone opened 5 years ago
如果是windows系统,可以在util.js中添加如下代码:
workspaceFolders.forEach(folder => { // 应对windows系统下的文件路径异常问题 folder = folder.replace(new RegExp("/","g"),'\').substring(1); if (currentFile.indexOf(folder) === 0) { projectPath = folder; } })` 将路径分隔符替换掉就可以了
如果是windows系统,可以在util.js中添加如下代码:
workspaceFolders.forEach(folder => { // 应对windows系统下的文件路径异常问题 folder = folder.replace(new RegExp("/","g"),'\').substring(1); if (currentFile.indexOf(folder) === 0) { projectPath = folder; } })` 将路径分隔符替换掉就可以了
请问应该在文件中的什么位置啊?以及最后一个`符号为什么只有一个,不应该是成对出现的吗?
the error message shows that '获取工程根路径异常!'
vscode:1.31 windows 7 sp1 professional
perhaps issue: src/util.js if (workspaceFolders.length == 1 && workspaceFolders[0] === vscode.workspace.rootPath) {
"vscode.workspace.rootPath" is deprecated.