From 69adf84363701288da3484758b09eece1216a462 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 21 Jul 2022 09:19:25 -0400 Subject: [PATCH] Console: Fix saving flat clients.config file when in portable configuration and changing the launch browser on startup setting on /configservice ref: http://zzz.i2p/topics/3347 --- .../src/net/i2p/router/web/ConfigServiceHandler.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java index 3f06e0d54..31c803ef9 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java @@ -363,10 +363,15 @@ public class ConfigServiceHandler extends FormHandler { String url = _context.portMapper().getConsoleURL(); ca = new ClientAppConfig(UrlLauncher.class.getName(), "consoleBrowser", url, 5, false); + clients.add(ca); } try { - if (ca != null) - ClientAppConfig.writeClientAppConfig(_context, ca); + if (ca != null) { + if (ClientAppConfig.isSplitConfig(_context)) + ClientAppConfig.writeClientAppConfig(_context, ca); + else + ClientAppConfig.writeClientAppConfig(_context, clients); + } addFormNotice(_t("Configuration saved successfully")); } catch (IOException ioe) { addFormError(_t("Error saving the configuration (applied but not saved) - please see the error logs"));