Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在控制 workspaceFolders 时的问题 #56

Closed
CandySunPlus opened this issue Aug 20, 2020 · 2 comments
Closed

在控制 workspaceFolders 时的问题 #56

CandySunPlus opened this issue Aug 20, 2020 · 2 comments

Comments

@CandySunPlus
Copy link

CandySunPlus commented Aug 20, 2020

if (data.added.length && flutterSDK.sdkHome !== '') {
const ignore = config
.get<string[]>('workspaceFolder.ignore', [])
.concat(flutterSDK.sdkHome)
.map(p => {
p = p.replace(/^(~|\$HOME)/, homedir());
return Uri.file(p).toString();
});
data.added = data.added.filter(fold => !ignore.some(i => fold.uri.startsWith(i)));
}
if (data.added.length || data.removed.length) {
next(data);
}

在108行的判断中,如果洽巧在 filter 后 data.added 是空列表了,还是需要执行 next(data) 的吧

@iamcco
Copy link
Owner

iamcco commented Aug 21, 2020

filter 后 data.added 为空为什么还要执行 next(data) ?

@CandySunPlus
Copy link
Author

完整看了一下执行流程,我理解错误,close 了吧,感谢回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants