提交 43017c72 编写于 作者: S Serge Rider

PAsswords save fix

上级 4e6f68b5
......@@ -1015,7 +1015,7 @@ public class DataSourceRegistry implements DBPDataSourceRegistry
curNetworkHandler.setEnabled(CommonUtils.getBoolean(atts.getValue(RegistryConstants.ATTR_ENABLED)));
curNetworkHandler.setUserName(CommonUtils.notEmpty(atts.getValue(RegistryConstants.ATTR_USER)));
curNetworkHandler.setSavePassword(CommonUtils.getBoolean(atts.getValue(RegistryConstants.ATTR_SAVE_PASSWORD)));
if (!passwordReadCanceled) {
if (!passwordReadCanceled && curNetworkHandler.isSavePassword()) {
curNetworkHandler.setPassword(readSecuredPassword(atts, curDataSource, "network/" + handlerId));
}
......
......@@ -217,15 +217,22 @@ public class DBNDataSource extends DBNDatabaseNode implements IAdaptable
String folderPath = dataSource.getFolderPath();
for (DBNNode node : nodes) {
if (node instanceof DBNDataSource) {
((DBNDataSource) node).setFolderPath(folderPath);
if (!((DBNDataSource) node).setFolderPath(folderPath)) {
return;
}
}
}
DBNModel.updateConfigAndRefreshDatabases(this);
}
public void setFolderPath(String folder)
public boolean setFolderPath(String folder)
{
final String oldPath = dataSource.getFolderPath();
if (CommonUtils.equalObjects(oldPath, folder)) {
return false;
}
dataSource.setFolderPath(folder);
return true;
}
public DBNNode refreshNode(DBRProgressMonitor monitor, Object source) throws DBException
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册