mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
PY-76629: PY-76714: Handle empty string of bundled stubs path
findPathStringInHelpers might return an empty string, that will be equal to the home path, that will lead to indexing of the home directory. GitOrigin-RevId: e800896a4c0631844a7b7a3a79334c3853a30c32
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ab53444089
commit
948779f507
@@ -508,7 +508,11 @@ public final class PythonSdkUpdater {
|
||||
}
|
||||
|
||||
private static @NotNull List<VirtualFile> getBundledStubs() {
|
||||
VirtualFile bundledStubRoot = StandardFileSystems.local().findFileByPath(PythonHelpersLocator.findPathStringInHelpers("bundled_stubs"));
|
||||
var helpersPath = PythonHelpersLocator.findPathStringInHelpers("bundled_stubs");
|
||||
if (helpersPath.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
VirtualFile bundledStubRoot = StandardFileSystems.local().findFileByPath(helpersPath);
|
||||
if (bundledStubRoot == null) return Collections.emptyList();
|
||||
return List.of(bundledStubRoot);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user