mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-12690 Detected from creating virtualenv interpreter has invalid slashes
This commit is contained in:
@@ -272,16 +272,18 @@ public class CreateVirtualEnvDialog extends IdeaDialog {
|
||||
FileChooser.chooseFiles(descriptor, myProject, suggestedDir, new FileChooser.FileChooserConsumer() {
|
||||
@Override
|
||||
public void consume(List<VirtualFile> selectedFiles) {
|
||||
final String path = selectedFiles.get(0).getPath();
|
||||
String path = selectedFiles.get(0).getPath();
|
||||
if (sdkType.isValidSdkHome(path)) {
|
||||
path = FileUtil.toSystemDependentName(path);
|
||||
Sdk newSdk = null;
|
||||
for (Sdk sdk : allSdks) {
|
||||
if (path.equals(sdk.getHomePath())) {
|
||||
newSdk = sdk;
|
||||
}
|
||||
}
|
||||
if (newSdk == null)
|
||||
if (newSdk == null) {
|
||||
newSdk = new PyDetectedSdk(path);
|
||||
}
|
||||
consumer.consume(newSdk);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user