Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Do not allow workspace root to be an interpreter/library path #1210

Merged
merged 2 commits into from
Jun 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public async Task ReloadAsync(CancellationToken cancellationToken = default) {
InterpreterPaths = await GetSearchPathsAsync(cancellationToken);

IEnumerable<string> userSearchPaths = Configuration.SearchPaths;
InterpreterPaths = InterpreterPaths.Except(userSearchPaths, StringExtensions.PathsStringComparer);
InterpreterPaths = InterpreterPaths.Except(userSearchPaths, StringExtensions.PathsStringComparer).Where(p => !p.PathEquals(Root));

if (Root != null) {
var underRoot = userSearchPaths.ToLookup(p => _fs.IsPathUnderRoot(Root, p));
Expand Down