mirror of
https://github.com/microsoft/pyright.git
synced 2024-08-16 19:30:26 +03:00
Fixed bug in resolution of relative imports.
This commit is contained in:
parent
8f294edeb7
commit
56fa8040c5
@ -203,11 +203,6 @@ export class ImportResolver {
|
||||
// Determine which search path this file is part of.
|
||||
let curDir = getDirectoryPath(this._sourceFilePath);
|
||||
for (let i = 1; i < moduleName.leadingDots; i++) {
|
||||
// Make sure we don't walk out of the root directory.
|
||||
if (!curDir.startsWith(this._executionEnvironment.root)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
curDir = getDirectoryPath(curDir);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user