Skip to content

Commit

Permalink
Backslash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian-panek-vmltech committed Mar 8, 2022
1 parent b936aa1 commit 977837f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/kotlin/com/neva/gradle/fork/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ abstract class Config(val fork: ForkExtension, val name: String) {

private fun promptPostProcess() {
definedProperties.forEach { property ->
if (property.type == PropertyType.URI || property.type == PropertyType.PATH) {
prompts[property.name]?.apply { value = value?.replace("\\", "/") }
}
if (property.type == PropertyType.PASSWORD) {
prompts[property.name]?.apply { value = fork.props.encryptor.encrypt(value, property.name) }
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/com/neva/gradle/fork/gui/PropertyDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class PropertyDialog(private val config: Config) {
if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
fieldFocused!!.document.insertString(
fieldFocused!!.caretPosition,
fileChooser.selectedFile.absolutePath.replace("\\", "/"),
fileChooser.selectedFile.absolutePath,
null
)
}
Expand Down

0 comments on commit 977837f

Please sign in to comment.