Plugins: Sort plugins.config when saving
Some checks failed
Java CI / build (push) Failing after 3s
Java CI / javadoc-latest (push) Failing after 6s
Java CI / build-java7 (push) Failing after 6s
Dockerhub / docker (push) Failing after 21s
Java with IzPack Snapshot Setup / setup (push) Failing after 11s
Daily Workflow / daily-job (push) Failing after 4s
Daily Workflow / javadoc-latest (push) Failing after 8s
Daily Workflow / build-java7 (push) Failing after 8s

This commit is contained in:
zzz
2025-05-04 14:02:12 -04:00
parent 0da4cf49c1
commit 6f9871e344

View File

@ -36,6 +36,7 @@ import net.i2p.util.FileSuffixFilter;
import net.i2p.util.FileUtil;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
import net.i2p.util.OrderedProperties;
import net.i2p.util.PortMapper;
import net.i2p.util.SimpleTimer2;
import net.i2p.util.SystemVersion;
@ -804,6 +805,11 @@ public class PluginStarter implements Runnable {
* plugins.config
*/
public static void storePluginProperties(Properties props) {
if (!(props instanceof OrderedProperties)) {
Properties p = new OrderedProperties();
p.putAll(props);
props = p;
}
File cfgFile = new File(I2PAppContext.getGlobalContext().getConfigDir(), CONFIG_FILE);
try {
DataHelper.storeProps(props, cfgFile);