From 4bc9f42f8b227d01ba2e5bec8175567532fb8fa4 Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Wed, 23 Apr 2014 14:16:11 +0400 Subject: [PATCH] fixed PY-12690 Detected from creating virtualenv interpreter has invalid slashes --- .../com/jetbrains/python/sdk/CreateVirtualEnvDialog.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/src/com/jetbrains/python/sdk/CreateVirtualEnvDialog.java b/python/src/com/jetbrains/python/sdk/CreateVirtualEnvDialog.java index 6ffcd0f1240d..0a9d63a24a31 100644 --- a/python/src/com/jetbrains/python/sdk/CreateVirtualEnvDialog.java +++ b/python/src/com/jetbrains/python/sdk/CreateVirtualEnvDialog.java @@ -272,16 +272,18 @@ public class CreateVirtualEnvDialog extends IdeaDialog { FileChooser.chooseFiles(descriptor, myProject, suggestedDir, new FileChooser.FileChooserConsumer() { @Override public void consume(List 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); } }