Skip to content

Commit

Permalink
[PDI-18683] VFS connection is not created if edited while being created
Browse files Browse the repository at this point in the history
  • Loading branch information
e-cuellar committed Mar 27, 2020
1 parent 809e15e commit 77b346e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2019 by Hitachi Vantara : http://www.pentaho.com
* Copyright (C) 2020 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
Expand Down Expand Up @@ -97,7 +97,9 @@ public Response getConnectionExists( @QueryParam( "name" ) String name ) {
public Response createConnection( ConnectionDetails connectionDetails, @QueryParam( "name" ) String name ) {
boolean saved = connectionManager.save( connectionDetails );
if ( saved ) {
connectionManager.delete( name );
if ( !connectionDetails.getName().equals( name ) ) {
connectionManager.delete( name );
}
getSpoon().getShell().getDisplay().asyncExec( () -> getSpoon().refreshTree(
ConnectionFolderProvider.STRING_VFS_CONNECTIONS ) );
EngineMetaInterface engineMetaInterface = getSpoon().getActiveMeta();
Expand Down

0 comments on commit 77b346e

Please sign in to comment.