diff --git a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/PathFieldComponent.kt b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/PathFieldComponent.kt index b29e4e67447..13816dbd500 100644 --- a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/PathFieldComponent.kt +++ b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/ui/components/PathFieldComponent.kt @@ -31,7 +31,7 @@ class PathFieldComponent( onValueUpdate ) { override val uiComponent: TextFieldWithBrowseButton = TextFieldWithBrowseButton( - textField(initialValue?.toString().orEmpty()) { path -> fireValueUpdated(Paths.get(path)) } + textField(initialValue?.toString().orEmpty()) { path -> fireValueUpdated(Paths.get(path.trim())) } ).apply { addBrowseFolderListener( TextBrowseFolderListener( @@ -45,5 +45,5 @@ class PathFieldComponent( uiComponent.text = newValue.toString() } - override fun getUiValue(): Path = Paths.get(uiComponent.text) + override fun getUiValue(): Path = Paths.get(uiComponent.text.trim()) } \ No newline at end of file